Creating a program to predict your age next year

Report a typo

Some code lines are jumbled in the Python program. The goal of the program is to get the user's name, their age, and then to calculate their age next year. Could you reorder these lines to create a program that works successfully?

Reorder lines using drag or arrows. Adjust indentation with left buttons
                print("Hello " + name + ", Next year you will be " + str(next_year_age) + " years old.")
              
                age = int(input("Please enter your age: "))
              
                name = input("Please enter your name: ")
              
                next_year_age = age + 1
              

Create a free account to access the full topic