Question: How do I solve this problem? [Executed at: Thu Jan 20 5:57: 19 PST 2022] I We found a few things wrong wi th your

How do I solve this problem?

How do I solve this problem? [Executed at: Thu Jan 20 5:57:

[Executed at: Thu Jan 20 5:57: 19 PST 2022] I We found a few things wrong wi th your code. The first one is shown below, and the rest can be found in full_results.txt i in the dropdown in the top lef We tested your code with test percent = 20, review_time = 2, feel_prepared = True. We expec ted your code to print this: 1 test_percent = 20 2 review_time = 2 3 feel_prepared = True 4 5 #You may modify the lines of code above, but don't move them! 6 #When you Submit your code, we'll change these lines to 7 #assign different values to the variables. 8 9 #You've been studying for your test for a few hours and you're 10 #trying to decide if you can go to bed or if you need to study 11 #longer. 12 # 13 #To go to bed, you need to feel prepared. Even if you "feel" 14 #prepared, you need to make sure you have prepared adequately: 15 #that means reviewing for at least 2 hours (review_time), or 16 #at least 4 hours if the test is worth 20 percent or more of 17 your grade. 18 19 #So, to go to bed, you must feel prepared (feel_prepared must 20 #be True), and you must have reviewed for 2 or more hours 21 (review_time must be greater than or requal to 2). If the 22 #test is worth 20% or more (test percent is greater than 23 #or equal to 20), you should have reviewed for 4 or more hours 24 (review_time greater than or equal to 4). 25 = 26 #Add your code below! It should print True if you can go to 27 bed, False if you cannot. 28 print ((feel_prepared and review_time >= 2) or (feel_prepared and test_percent >= 20 and review_time >= 2)) 29 30 31 32 33 34 False However, it printed this: True

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!