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

Please tell if my answer is right or wrong.
How do I get better at Risk the Board Game
how do i find an ordered pair using substituion with these equations y=-4×-19 y=4×+5
Please I need help thank you!
Find 2 numbers with a sum of 46 and a product of 408
Explain what it means for the Supreme Court to have original and exclusive jurisdiction over certain cases.
Suppose you have a large boulder in your yard that you’d like to move. How could you break it into smaller pieces without using a sledgehammer?
Could someone please help me
The maximum contaminant level of copper (Cu) in drinking water as set by the the Environmental Protection Agency (EPA) is 0.0013 g⋅L−1 . Express this concent
Plz help me with 10, 11, 12, 13, 14, and 15