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

Tommy and his friend went to go buy pie at Delicious Orchards. After paying seven dollars for the pie, Tommy has ninety-five dollars left, his friend has forty
What event in 1939 caused Britain and France to declare war on Germany, starting WWII? A Germany took control of Austria. B Germany rebuilt its military. c) Ge
Write the following sentence as an equation. Use x to represent "a number." The product of 2 and the sum of 6 and a number is -40. The equation is a (Do not sim
Help this is due today!!!
3 Select the correct answer. Which statement describes how the 1945 vice-presidential change from Wallace to Truman influenced the Cold War? OA. It discouraged
what is 18,678,789 times 67,897,867
Was the trade of Bengal coal immediately successful?
Can you please help. I will give brainleast. Oh and please have an explanation.
Why does piri want to go down south
Which of the following statements are true concerning product distribution in the halogenation of an alkane? a. Halogenation of alkanes follows a chain mechanis