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

The hypothesis becomes the basis of what? A. the data to interpret B. a law C. a statistical analysis D. the experiment
I WILL MARK YOU BRAINLIEST, I NEED IT ASAP. A round pizza is 12 inches long. How many inches of stuffed crust do you need to put around the edge of the pizza? S
1. Erika found out that after working in her current job for 9 months, she has earned 6 days of vacation If Erika wants to take a 10-day vacation, how long doe
Which equation is the inverse of y = 2x2 - 8? O y=+ X+8 2 2 y + / +8 2 o y=+ Х +8 + O y = 2
Explain the significance of the nucleus in determining the characteristics of the offspring
What is a satirist goal ?
What is the theme of counting descent
Who sets public policy? A) any group large enough to have influence B) Congress, through laws and Constitutional amendments OC) political parties, through their
Which of the lines in the picture is parallel to line l? Explain how you know.
In 1776, when the colonist declared their independence and formed the united states, what happened?