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

how do you solve m/9 divided by mn squared / 3
Tasha believes that she can rewrite the difference 120 - 36 as a product of the GCF of the 2 numbers and another difference. Is she correct?
what is the value for the expression -5+ 5
Natalie picked 135 berries in 15 minutes. If she continues picking at that rate, how long will it take her to pick 486 berries?
A crime suspect fled the scene when police officers entered the building. How far could he run in 10 minutes if he can run 5 miles per hour?
How do three planes intersect at one point?
What is an equivalent fraction for 20/12
what is the solution to 1/3(s-2)=s+4
which property you used.64+58=                    +64
a couple wants to install a square mirror that has an area of 500 square inches.to the nearest tenth of an inch,what length of wood trim is needed to go aroun