SyntaxError: invalid syntax when called after function definition

Asked 2 years ago, Updated 2 years ago, 161 views

I did this, but I keep getting errors

def get_generation(x):
    return str ((x//10)*10) + 'large'

age = int(input(x))

print(get_generation(age) + "I see")

If I type 28, I want to get 20s like this..
What should I do?

python function return syntax-error

2022-09-21 10:17

1 Answers

def get_generation(x):
    return str ((x//10)*10) + 'large'

age = int(input('Enter your age:'))

print(get_generation(age) + "I see")


2022-09-21 10:17

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.