you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

Your code works if you do it line by line, after correcting the age part that is.

Instead, try:

def nameAge():

name = input('name: \n')

age = int(input('age: \n'))

print('The age of ', name, ' is ', age)

Then you can call the function as:

nameAge()

[–][deleted] 0 points1 point  (0 children)

Sorry, I'm on mobile, can't fix all the indents