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 are these headlines related to the bill of rights?
List 5 things you should look for when selecting a health club.
What motivates many South Americans to move from rural to urban areas? irrigation the fact that mechanized agriculture has replaced manual labor plantation f
Faça uma análise e depois aponte quais s?o as principais causas responsaveis pelo conflito no continente africano
which type of remote sensing is shown in the photo above
A group of design engineers for ford motor company spends two months of summer in the arizona desert researching fuel performance at extreme temperatures. ford
Can someone help me on this question please mark brain
#5! And #4 revisions!
Which term best describes how light waves from a star are affected as the star moves toward earth? A.Diffraction B.Redshift C.Blueshift D.Cosmological Redshift
The population of a town increased from 5600 to 6300 people. What was the percent of increase