The following code segment is used for both parts 5 and 6. 1…

The following code segment is used for both parts 5 and 6. 1| if subscription == “Premium” and hd_available:2|     print(“You’ve been upgraded to HD!”)3| elif (subscription == “Premium” or subscription == “Standard”) and sd_available:4|     print(“You’ve been upgraded to SD!”)5| else:6|     print(“You’re on the basic plan.”)   Which of the following values for subscription, hd_available, and sd_available would result in “You’ve been upgraded to HD!” being printed?

1| try: 2| some_function() 3| except Exception as the_error:…

1| try: 2| some_function() 3| except Exception as the_error: 4| print(the_error) 5| [fill in this blank]6| print(“Code complete!”) The code segment above attempts to run a function called some_function, but if it fails, it tries to print the error that occurred. Only if some_function() ran without errors is “Code complete!” printed at the end. Which of the following lines would complete this code so that it behaves as intended?

The following code segment is used for both parts 7 and 8.  …

The following code segment is used for both parts 7 and 8.  1| if age < 18: 2|     if fitness_level >= 7: 3|         print(“Join the advanced youth training program!”) 4|     elif fitness_level >= 4: 5|         print(“Join the intermediate youth training program!”) 6|     else: 7|         print(“Join the beginner youth training program!”) 8| else: 9|     if fitness_level >= 7:10|         print(“Join the advanced adult training program!”)11|     elif fitness_level >= 4:12|         print(“Join the intermediate adult training program!”)13|     else:14|         print(“Join the beginner adult training program!”)   Which of the following values for age and fitness_level would result in “Join the beginner adult training program!” being printed?

The following code segment is used for both parts 5 and 6. 1…

The following code segment is used for both parts 5 and 6. 1| if subscription == “Premium” and hd_available:2|     print(“You’ve been upgraded to HD!”)3| elif (subscription == “Premium” or subscription == “Standard”) and sd_available:4|     print(“You’ve been upgraded to SD!”)5| else:6|     print(“You’re on the basic plan.”)   Which of the following values for subscription, hd_available, and sd_available would result in “You’ve been upgraded to SD!” being printed?

1| [fill in blank]2| if minutes_remaining > 90: 3| print(“Wa…

1| [fill in blank]2| if minutes_remaining > 90: 3| print(“Watch a movie!”) 4| elif minutes_remaining > 45: 5| print(“Watch a TV episode!”) 6| elif minutes_remaining > 20: 7| print(“Watch YouTube!”)   Choose the code that when put into line 1 would result in “Watch a TV episode!” being printed.

[Example for writing a program.] When writing a software, yo…

[Example for writing a program.] When writing a software, you may be asked to write an entire program, a program fragment, or a subroutine. In all cases, in our canvas exams, you will see the following sentence: In your provided response, format all text with the “Preformatted” style given by Canvas. (See the dropdown menu above shown as “Paragraph”.) Practice writing parts of a program here to see what works and what does not work. Write at least two lines in a “program” using the proper format; failure to use this formatting in other assignments will cause you to lose points.