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

howcto write 9,000,009 in word form
____ has contributed the greatest number of immigrants to the United States. france england germany ireland
Two atomic bombs were dropped on this nation, thus ending World War II. China Germany Soviet Union Japan
Sofia learned 10 recipes to create party dishes. She learned these recipes in two weeks. How many recipes can Sofia learn in 5 weeks ?
(5y^4-3y^3+2y^2-6y+5)+(-3y^+6y^3-4y^2-4y-8) can someone simplify that
help please asap!!!!!!!!!!!!!!!!!!!
Why has the physical description of the hero changed throughout the years? A. To prove that authors can create original characters B. To allow for the advanceme
Being rejected by a peer group can negatively influence one's self-esteem.
Oxygen enters the ocean through mixing and photosynthesis. true or false?
A solution that contains equal numbers of hydrogen and hydroxyl ions would be called acidic basic alkaline neutral