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

is the mantle hotter than the core true or false
How might the front page help sell the newspaper? ​
Solve using the quadratic formula. Show all work. Write each solution in simplest form. No decimals.
Source: "Mr. Polk's War," A Patriot's History of the United States. Schweikart and Allen, 2002 ENT B: President Spe... Note: In 1844, annexation was negotiated
Windmill Corporation,a Dutch corporation,is owned by the following unrelated persons: 50 percent by a U.S.corporation,5 percent by a U.S.individual,and 45 perce
exponens question in the image below
Our fingers have finger tips but our toes don't have toe tips yet we can still tip toe
who wants free brainlyist just answer your welcome​
A babysitter earns $8 an hour for babysitting 2 children and an additional $3 tip when both children are put to bed on time. If the babysitter gets the children
The average weekly salary of two employees is $5350. One makes $250 more than the other. Find their salaries. One employee makes $ and the other makes $?