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

Can somebody help me on this?
A hose can fill a swimming pool in 10 hours. Another hose needs 5 more hours to fill the pool than the two hoses combined. How long would it take the second hos
for what purpose is a nuclear power plant typically used? why must the nuclear power plants of some countries that signed the nonproliferation treaty be monitor
people all over ___ world have different eating habits. complete the sentence with the suitable determiners
Brian’s surgery is a delicate process. Which syllable would be stressed?
the total number of protons and neutrons in an atom is known as
if johnny had 5 apples and ate 2 how many apples does johnny have now?
IF I WAS GAY WOULD YOU STILL LIKE ME
Identify the stages of meiosis
Solve for x in the parallelogram below A. 8 B. 12 C. 20 D. 2