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

Which of the following have 4 as the GREATEST common factor (GCF). Select ALL that apply. 4 + 8y 4x + 40y - 400 24x - 16y x - 4y + 16x 4 - 12x
Dustin's town voted on a new speed limit. 40% of the 60 votes were in favor of the new speed limit. How many votes were in favor? votes
PLEASE HELPPPP!!! Find the measure of angle A
How does the Senator compare the struggle for women‟s suffrage to the fight for American Independence?
Casey's dog weighs 56.2 pounds. Janelle's dog weighs 22.65 pounds. How much more does Casey's dog weigh than Janelle's dog?
Karen orders her groceries from a store that charges her 5% extra to deliver the groceries to her house
Please answer both questions
Please help I will mark brainliest!!!!
math pls help giving them brain things and 100 points
What impact do you think Marco Polo had on world trade?