idjfjcjs7291 idjfjcjs7291
  • 02-12-2022
  • Computers and Technology
contestada

Write a program that accept a whole number a input, mutiplie that number by 21, and then output the product

Respuesta :

candlejenner candlejenner
  • 03-12-2022

Answer:

while True:

   try:

       whole_number = int(input("Enter a whole number: "))

       break

   except ValueError:

       print("That is not a whole number. Try again.")

product = whole_number * 21

print("The product is", product)

Explanation:

using while true and except ValueError to make sure the user enters a whole number

Answer Link

Otras preguntas

Which is greater 2.75 gallons or 12 liters
Debra has 2/3 of a pound of loose green tea leaves. If she wants to keep one-half if the tea at home and the other half at work, what fraction of a pound will s
10 gallons divided by 17 people
6 [ 4 × ( 72 - 63 ) ÷ 3 ]
Dark spots on the photosphere are known as A. solar wind. B. the chromosphere. C. the corona. D. sunspots.
How do I expand mx(ab-b) by using the distributive property?
Translate the phrase into a math expression. 30 added to a number that is decreased by 5 a. n – 5 + 30 b. 30 – n – 5 c. 30 + 5 – n d. 30 + (n ÷ 5)
Which is greater 2.75 gallons or 12 liters
What is the base of a triangle whose height is 10 and whose area is 160
the height of wind formed waves depends on what three things?