devondenham12 devondenham12
  • 09-11-2017
  • Computers and Technology
contestada

can some one fix this
input ("Enter a number: ")
print (num * 8)

Respuesta :

Zepdrix
Zepdrix Zepdrix
  • 09-11-2017
If you save the input as num,
this will print the input 8 times.

num = input("Enter a number: ")
print(num * 8)

If you want to do actual math calculations,
then the input needs to be a number.

num = float(input("Enter a number: "))
print(num * 8)

This doesn't account for any errors in which the user doesn't input a number, but I don't think that's what you were looking for anyway :)
Answer Link

Otras preguntas

can you help me understand this?  In the number 7,725, which places contain digits where one digit is ten times as great as the other?
did Sarah Boone have siblings? if so what are they're names? _______________________________ ____________________________________ ______________________________
The sum of a 3 digit number and a 1 digit number is 217. The product of the numbers is 642. If one number is between 200 and 225, what are the numbers?
what is a herbivore. is a atlantic herring a carnivore
How you would use repeated subtraction to find 8 divided by 2 math
Which candidate wins the presidency under the election process used in the United States?
what is the difference of 0.35 and 0.062?
Santiago receives an allowance of $7 every week . How much total does he receive in 4 week?
What two numbers multiply to 630 and add to -57
Hwong can fit 12 packets of coffee in a small box and 50 packets of coffee in a large box. Hwong has 10 small boxes and would like to reorganize them into larg