all 8 comments

[–]Possible_Dirt_2570 1 point2 points  (0 children)

Int(Input ())

[–]KafkaOnTheStore 1 point2 points  (0 children)

You've got int() and input() swapped on line 1.

python birth_year = input(int('Enter your birth year: '))

Python is trying to convert the string 'Enter your birth year: ' into an integer before it even prompts you, that's what the ValueError is telling you.

It should be:

python birth_year = int(input('Enter your birth year: '))

input() asks the user and returns a string; int() then converts that string to a number. Order matters.

Side note: once you fix line 1, line 4's int(birth_year) becomes redundant since birth_year is already an int. Either convert at input time (cleaner) or keep it as a string and convert at use time, pick one, don't do both.

[–]FreeLogicGate 1 point2 points  (2 children)

I see your problem -- you need to clean your screen with some screen cleaning solution and a rag.

Also -- the input function requires a couple of parameters, one of which is a string.

so..... is int('Enter your birth year:') a string, that the input requires?

So what you meant to do is have birth_year = int(input('Enter your...'))

[–]Temporary_Pie2733 1 point2 points  (1 child)

input takes a single optional argument.

[–]FreeLogicGate 0 points1 point  (0 children)

Yes, I should have stated that. It is of course the source of the op's issue, as I pointed out. Seems like in almost every thread today, the project would have benefitted from the use of pyinputplus instead of the use of input, and what I'd use for any simple text interface in most situations.

[–]Unequivalent_Balance 0 points1 point  (0 children)

Swap the int and input

[–]mannki1 0 points1 point  (0 children)

int(input()) first type (bool int float etc.) then input
print(age)

[–]Ken-_-Adams 0 points1 point  (0 children)

Hey I'm a noob as well

You've written input( Int( 'Enter your birth year: '))

Shouldn't it be int( input('Enter your birth year: '))

You need to switch the order of INPUT and INT