Computers and Technology

Write a program that divides mystery_value by mystery_value #and prints the result. If that operation results in an #error, divide mystery_value by (mystery_value + 5) and then print the result. If that still fails, multiply mystery_value #by 5 and print the result. You may assume one of those three things will work. 1 mystery_value = 5 2 3 #You may modify the lines of code above, but don't move them! 4 #when you submit your code, we'll change these lines to 5 #assign different values to the variables. 6 I 7 #write a program that divides mystery value by mystery_value 8 #and prints the result. If that operation results in an 9 #error, divide mystery value by (mystery_value + 5) and then 10 #print the result. If that still fails, multiply mystery_value 11 #by. 5 and print the result. You may assume one of those three 12 #things will work, 13 # 14 #You may not use any conditionals. 15 # 16 #hint: You're going to want to test one try/except structure 17 #inside another! Think carefully about whether the second 18 #one should go inside the try block or the except block. 19 20 21 #Add your code here! 22

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:40, DisneyGirl11
Which is a benefit of getting information from a government website? a. the information will be easy to understand. ob. the information will be the most current. oc. the information can be trusted.
Answers: 1
image
Computers and Technology, 22.06.2019 11:10, golderhadashaowtatz
Which are not examples of chronic or persistent stress? moving
Answers: 1
image
Computers and Technology, 23.06.2019 07:30, barkonatree
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
image
Computers and Technology, 23.06.2019 19:30, sallybob0
What are loans to a company or government for a set amount of time
Answers: 1
Do you know the correct answer?
Write a program that divides mystery_value by mystery_value #and prints the result. If that operatio...

Questions in other subjects:

Konu
English, 19.09.2019 22:00