Help with input and numbers


#1

age = input(“How old are you?”)
if idade > 13:
print (“Adult”)

Whats the problem with this part of the code


#2

Use the english term, age since that is the name of the variable in the input statement.


#3

I changed and there’s still an error


#4

It works until I put some random number and then gives an error


#5

Please repost your entire code, along with the URL of the exercise and any error message.


#6

Question

I typed the code below

def cube(nunber):
return numbernumbernumber
def by_three(number):
if number % 3 == 0:
print cube(number)
else:
print “false”

when i called it with : by_three(123)
it shows the following:
Traceback (most recent call last):
File “python”, line 8, in
File “python”, line 5, in by_three
File “python”, line 2, in cube
NameError: global name ‘number’ is not defined

thank you in advance


#7

Check the spelling of your parameter.

Aside

Since this coincides with a lesson on exponentation, it might be a good time to practice using the ** operator.

number ** 3