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

Write an addition equation with a positive addend and a negative addend and a resulting sum of -8
The most commonly spoken language in the Fertile Crescent around the time of Jesus was
is a piece of cloth a point, line, or plane?
what is this number in word form 3,152,308,726
What is the coefficient of x in the expression x-2? Explain your reasoning.
How do three planes intersect at one point?
For this assessment, you will be taking Newton’s laws and describing how they are illustrated in a specific event. You only need to choose one of the options pr
The gram formula weight of phosphoric acid is 98.00 g/mol, and the density of 85.0% phosphoric acid is 1.685 g/mL. Could you describe how ...
Which of the following did NOT grow or increase as a result of early farming? villages trade life spans cities
Which two countries were the first to declare war on Germany in WWII?