Help with input and numbers


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

Whats the problem with this part of the code


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


I changed and there’s still an error


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


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



I typed the code below

def cube(nunber):
return numbernumbernumber
def by_three(number):
if number % 3 == 0:
print cube(number)
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


Check the spelling of your parameter.


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

number ** 3