1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pshichka [43]
3 years ago
14

Write a program that divides mystery_value by mystery_value #and prints the result. If that operation results in an #error, divi

de 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
Computers and Technology
1 answer:
Zolol [24]3 years ago
5 0

Answer:

mystery_value = 5  

try:

   print(mystery_value / mystery_value)

except:

   try:

       print(mystery_value / (mystery_value + 5))

   except:

       print(mystery_value * 5)

You might be interested in
Which structural adaptation would help a plant survive better in a shady environment?
Aleks04 [339]
C. Large Leaves

Explanation:
Large leaves enable the plant to absorb more of the scarce sunlight it recieves, so it can create enough nutrients for it to survive. Plants need sunlight to perform photosynthesis. Photosynthesis is when a plant takes in sunlight and turns it into food for itself.

Hope this helped!!
4 0
3 years ago
Read 2 more answers
In which career does the level of education vary the most?
Ksenya-84 [330]
Journalism
all the best
3 0
3 years ago
Read 2 more answers
Analyzing an algorithm with Big O notation is useful for predicting:_______.
seropon [69]

Answer:

C. The performance of the algorithm as different amounts of inputs are processed

Explanation:

Analyzing an algorithm with Big O notation is useful for predicting:

The performance of the algorithm as different amounts of inputs are processed

7 0
3 years ago
A customer in a store is purchasing 5 items. Write a python program that asks for the price of each item and display the subtota
alex41 [277]

Answer:

total = 0

for i in range(5):

 product = float(input())

 tax = product * 0.07

 print('Product price:',product)

 print('Product tax:',tax)

 print('----------------------')

 total += product+tax

print('Total:',total)

Explanation:

Step 1 variables definition

total = 0

Step 2 loop over quantity of products

for i in range(5):

Step 3 ask for price and calculate the tax

product = float(input())

tax = product * 0.07

Step 4 print the product total

 print('Product price:',product)

 print('Product tax:',tax)

 print('----------------------')

Step 5 print the general total

print('Total:',total)

6 0
3 years ago
Which of the following students would be best suited to pursue a career in
Damm [24]

Answer:

<h3>B. Jill has strong computer skills and is interesting in design. She hopes to enter the work force within three years of grauduating high school...</h3>
4 0
3 years ago
Read 2 more answers
Other questions:
  • Pam wants to include a video from a website in an upcoming presentation. However, she knows she will not have access to an inter
    15·2 answers
  • A chemical found in the synaptic vesicles , which , when released . has an effect on the next cell is called a?
    10·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    11·1 answer
  • What is the outside of an iPhone called?
    9·2 answers
  • Why does world of tanks keep downloading when I'm not even at the computer
    9·1 answer
  • B. What is a window?​
    8·2 answers
  • Which component is a part of the CPU of a computer
    12·2 answers
  • Which sequence of slides would be followed in a linear slideshow? A. slide 4 -&gt; slide 5 -&gt; slide 6 -&gt; slide 7 B. slide
    8·2 answers
  • How do I send the face to the back? Seriously, I can't find out how...
    13·1 answer
  • How can you make a search phrase more effective?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!