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

Stored food in plants is eaten by animals for energy. true false
What is a line graph?
The disagreements between hamilton and jefferson led to
what is dog in spanish
what is the product of the binomial (x+4)(x+3)
Successful leaders allow others to take risks. please select the best answer from the choices provided. t f
The best surface to run on is one that's ? A. hilly so that you can improve your cardiovascular endurance. B. as hard as possible so that it adds more stability
At constant pressure, the volume of a fixed mass of gas and its kelvin temperature are said to be a. directly related. b. inversely related. c. unrelated. d.
Find the first fourth and eighth terms of A(n)=-2•5^n-1
Simplify. 4ab5c(3a4b2c3) a. 12a5b3c4 b. 12a5b7c4 c. 12a5b10c4 d. 12a4b10c3