subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
Reading characters and strings from the keyboard: consider the following c++ program 1. #include 2. #include 3. using namespace std; 4. mystring1 5. 6. int main() 7. { 8. 9. string mystring1, mystring2; mychar1 10. 11. 12. char mychar1, mychar2; 13. 14. cout< < "enter a string: "; mychar2 15. 16. cin> > mystring1; // 17. cin.get(mychar1); 18. cin> > mychar2; 19. getline(cin,mystring2); mystring2 20. 21. 22. cout<
Answers: 1
question
Computers and Technology, 22.06.2019 05:00
Pls do you believe that the use of 3d animation has grown in feature films over the last few years? if so, do you think the trend will continue? what are the forces driving this trend?
Answers: 2
question
Computers and Technology, 22.06.2019 16:20
Consider the following statements, then select one of the answers below: the signal() function shown below registers "sig_handler()" as the signal handler function for the sigkill signal, without the complexity of using when the sigkill signal is sent to a process running this code, by a user typing "kill -kill ", where the correct process id is used for to target the process, sig_handler() will be executed.
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
You know the right answer?
Write a program that divides mystery_value by mystery_value #and prints the result. If that operatio...
Questions
question
Chemistry, 30.07.2019 07:00
question
Mathematics, 30.07.2019 07:00