0

I put in a new variable and the compiler keeps saying EOF error

age = int(input()) new_discount_age = int(input()) def calculate_growth(original_data, new_discount_age): original_revenue = 0 new_revenue = 0 for ticket_number, age in original_data.items(): if age < 18: original_revenue += 5 else: original_revenue += 20 if age < new_discount_age: new_revenue += 5 else: new_revenue += 20 growth = ((new_revenue - original_revenue) / original_revenue) * 100 return int(growth) original_data = {"123-08": 24, "123-09": 12, "123-10": 30} print(calculate_growth(original_data, new_discount_age)) The new_discount_age = int(input()) is what is causing the problem how do I fix it

25th Apr 2023, 1:31 AM
ARBEIT MANN
ARBEIT MANN - avatar
3 Answers
+ 8
TENGRANN SAN , you have already posted the same task yesterday, so why you create a new post? > i have given you some hints to your initial code. please read them carefully and try to solve the issues. anyway, it's just 2 things to modify as you can see in the attached file: https://code.sololearn.com/cY8aB3RtD4NW/?ref=app
25th Apr 2023, 6:57 AM
Lothar
Lothar - avatar
+ 7
You have changed the default code quite a bit. As Ipang said, you only need the 1 input. Please, review the lesson again, look at your code and see if you can figure out what you've done incorrectly. If you need further help, read the following to attach your code: https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
25th Apr 2023, 6:56 AM
Ausgrindtube
Ausgrindtube - avatar
+ 5
Are you sure the task requires your code to read two inputs? isn't it just one?
25th Apr 2023, 2:36 AM
Ipang