Ask Question
15 February, 17:48

Write a conditional with an 'if' and an 'else': - The 'if' should check if the variable 'subj_age' has the value ''old'' (a string). - If so, it should set the variable 'change_analysis' to the value 'True' (a boolean) - Else, the variable 'change_analysis' should be set to False (a boolean)

+2
Answers (1)
  1. 15 February, 20:53
    0
    subj_age = "old"

    if subj_age = = "old":

    change_analysis = True

    else:

    change_analysis = False

    print (change_analysis)

    Explanation:

    * The code is in Python

    Initialize the subj_age variable

    Check if subj_age is equal to "old". If it is, set change_analysis as true.

    Otherwise, set change_analysis as false

    Print the change_analysis
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Write a conditional with an 'if' and an 'else': - The 'if' should check if the variable 'subj_age' has the value ''old'' (a string). - If ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers