Retype the below code. Fix the indentation as necessary to make the program work. if 'New York' in temperatures: if temperatures['New York'] > 90: print('The city is melting!') else: print('The temperature in New York is', temperatures['New York']) else: print('The temperature in New York is unknown.') Sample output with input: 105 The city is melting! mtu 000 1 temperatures 2 Seattle': 56.5, 3 'New York': float(input), "Kansas City': 81.9, 5 'Los Angeles': 76.5 6} 7 8 Your solution goes here 9 Create a conditional expression that evaluates to string "negative" if user_val is less than 0, and "non-negative" otherwise Sample output with input:-9 -9 is negative 1 user_val = int(input) 3 cond_str = "Your solution goes here *** 2 4 5 print(user_val, 'is', cond_str) Using a conditional expression, write a statement that increments num_users if update_direction is 3, otherwise decrements num_users. Sample output with inputs: 83 New value is: 9 1 Input() num_users = int(input) 2 update_direction = int(input) 3 4 num_users = ""* Your solution goes here 5 6 print("New value is:', num_users) Write an expression that executes the loop body as long as the user enters a non-negative number. Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message. Sample outputs with inputs: 952-1 Body Body Body Done. 1 user_num = int(input) 2 while Your solution goes here: 3 print('Body') user_num= int(input) 4 5 6 print('Done.') Write a while loop that repeats while user_num 21. In each loop iteration, divide user_num by 2 then print user_num. Sample output with input: 20 10.0 5.0 2.5 1.25 0.625 Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message. 1 user_num= int(input()) 2 3. Your solution goes here 4

Q&A Education