Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How can I solve this question? Console output will be displayed here 1 exam = False 2 sunny = False 3 sunblock = False 4

How can I solve this question?

image text in transcribed

image text in transcribed

Console output will be displayed here 1 exam = False 2 sunny = False 3 sunblock = False 4 morning classes = True 5 night_classes = True 6 raining = False 7 rain_jacket = True 8 snowing = False 9 friends are going = True 10 fluffy_coat = False 11 snow_boots = True 12 really_want_to_go = True 13 14 #You may modify the lines of code above, but don't move them! 15 #When you Submit your code, we'll change these lines to 16 #assign different values to the variables. 17 18 #Imagine you commute to your classes and want to write code to 19 #determine when it is appropriate for you to go to class based 2e #on the following conditions: 21 22 # - If you have an exam, then you should go to class, regardless 23 + of the weather. 24 # - If you do not have an exam and it is sunny outside, then you 25 # want to go to class if either of the following are true: you 26 # have sunblock and your classes are in the morning or your 27 = classes are at night. 28 # - If you do not have an exam and it is raining outside, then 29 # you want to go to class if you have a rain jacket. 30 # - If you do not have an exam and it is snowing, then you want 31 to go if any of the following are true: your friends are 32 # going and you have a fluffy coat, you have snow boots and a 33# fluffy coat, or you just really want to go to class. 34 35 #If none of the previously stated conditions are true, then you 36 do not want to go to class. 37 38 #Once you have determined if you should go to class, print the 39 #following statement without the quotation marks, where 40 #corresponds to the boolean that you have found: 41 #"True or false: I should go to class: N Console output will be displayed here GUT 15 #When you Submit your code, we'll change these lines to 16 #assign different values to the variables. 17 18 #Imagine you commute to your classes and want to write code to 19 #determine when it is appropriate for you to go to class based 20 #on the following conditions: 21. # 22 # - If you have an exam, then you should go to class, regardless 23 # of the weather. 24 # - If you do not have an exam and it is sunny outside, then you 25 # want to go to class if either of the following are true: you 26 have sunblock and your classes are in the morning or your 27 # classes are at night. 28 # If you do not have an exam and it is raining outside, then 29 # you want to go to class if you have a rain jacket. 30 # If you do not have an exam and it is snowing, then you want 31 # to go if any of the following are true: your friends are 32 # going and you have a fluffy coat, you have snow boots and a 33 Fluffy coat, or you just really want to go to class. 34 35 #If none of the previously stated conditions are true, then you 36 #do not want to go to class. 37 38 #Once you have determined if you should go to class, print the 39 #following statement without the quotation marks, where 40 #corresponds to the boolean that you have found: 41 #"True or false: I should go to class: 42 43 #Add your code here! #with the initial inputs, your code 44 #should print: 45 #True or false: I should go to class: False 46 have_exam = exam and sunny or raining or snowing 47 do_not_have_exam_1 = exam and sunny or (sunblock) and (morning_classes or night_classes) 48 do_not_have_exam_2 = exam and rain jacket 49 want to go = exam and snowing and friends_are_going and fluffy_coat and snow_boats or really_want_to_go) 50 will_not_go = have_exam and do_not_have_exam_1 and do_not_have_exam_2 and want_to_go 51 print("True or false: I should go to class:", wili_not_go) 52 53 ho

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Focus On Geodatabases In ArcGIS Pro

Authors: David W. Allen

1st Edition

1589484452, 978-1589484450

More Books

Students also viewed these Databases questions

Question

What four phases make up the cycle?

Answered: 1 week ago

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago