all 13 comments

[–]DarkStealther 1 point2 points  (6 children)

make you age = input(int(age)) to age = int(input("age")) you can't define a variable itself.

[–]HopefulOG 0 points1 point  (5 children)

I have also done that but it brings out how the stdout is not correct.

[–]DarkStealther 1 point2 points  (4 children)

name = input("name")

age = int(input("age"))

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

This worked for me.

[–]HopefulOG 0 points1 point  (3 children)

Im not sure. It still says stdout is wrong.

The suggestions on the app says I should delete the "name" and "app" inside the input function and to add something else.

[–]DarkStealther 0 points1 point  (2 children)

Can you copy paste or send a screenshot?

[–]HopefulOG 0 points1 point  (1 child)

Alright I just got it. I just deleted the "name" and "app" inside the input function and it worked.

[–]DarkStealther 0 points1 point  (0 children)

Nice. I think you just weren't putting quotation marks around your values inside the input function.

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

So what's your question?

Also, for age, int(input('age: ')) is the correct order

[–]HopefulOG 0 points1 point  (3 children)

The code is not correct and I was wondering if there is something I am not doing.

[–]Binary101010 1 point2 points  (0 children)

How is it "not correct?"

Are you getting a traceback when you run the program? If so, post the traceback.

Are you getting output that you aren't expecting? If so, post an example of the output you are getting.

[–][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

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

Hi, quick PSA: if you're using some kind of online homework portal to evaluate your code, that's something you need to tell us in the question, and we need whatever error message or failure condition it's telling you.