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

what is 10000000000+10000000000
When money loses some of its value over time, it is caused by A. purchasing power B. FICA C. recalculating worth D. inflation
Please help ASAP I need helppppoñ
What does a country need to do to keep a republic, and not fall under the power of a dictator?
Abraham Lincoln delivered his address: in 1866 in Ford's Theatre. to celebrate the 4th of July holiday. during the Civil War. None of the choices are correct.​
what will happen if burdens are carried on by few individuals and benefits shared with those who haven't contributed plssss
One way to ensure that the race ends up in a tie is to have the person who lost the original race run a shorter distance before turning around. Instead of 80.0
help me please!! 10 points
What is the value of a for the following circle in general form? x2 + y² + ax + by+c=0
Determine the mode of the following data set: -- 3, 12, 5, 12, 11, 2, 3, 10, 7, 6, 1, 4 a. 12 b. 3 and 12 c. no mode d. 5