Feedback On How I Can Clean Up My Code I am new to coding for ~1 week. I know that I learn best by doing, and so I decided to work on a small and simple project while utilizing various online sources to learn as I go.
Anyway, I decided to write a little program that asks the user to input their age and then prompts the user to enter an age they wish to be while providing them with the difference and a few little exceptions along the way.
Since I am still new and am learning on my own, I decided to reach out to this forum and see if I can get any suggestive feedback on how I can improve my code and learn some new techniques. Thank you!
Points of interest:

I have it so the code loops back until integers are inputted.

The program can be recalled by the user to enter different values.

I am still working on making it so that negative values can not be inputted.


The Code:
# This program will prompt you to state your age and then will proceed to
# calculate how long till __ age


# Introduction
print(&quot;Hello. &quot;)


# Defining Functions
def main():
    while True:
        try:
            myAge = int(input(&quot;Please enter your age: &quot;))
        except ValueError:
            print(&quot;I'm sorry, please enter your age as a numeric value.&quot;)
            continue
        else:
            break

    def secondV():
        while True:
            try:
                global desiredAge
                desiredAge = int(input())
                print(&quot;Do you wish to be &quot; + str(desiredAge) + &quot;?&quot;)
                choose()
            except ValueError:
                print(&quot;Please enter a numeric value.&quot;)
                continue
            else:
                break

    def desiredFuture():
        while True:
            try:
                global desiredAge
                desiredAge = int(input())
                while True:
                    if desiredAge &lt; myAge:
                        print(
                            &quot;Silly, time does not move backwards. Learn how to embrace the future, not fear it.&quot;)
                        print('Please input an age you wish to be in the FUTURE now...')
                        desiredFuture()
                        break
                    if desiredAge == myAge:
                        print(&quot;You are already &quot; + str(desiredAge))
                        break
                    else:
                        print(&quot;Do you wish to be &quot; + str(desiredAge) + &quot;?&quot;)
                        choose()
                        break
            except ValueError:
                print(&quot;Please enter a numeric value.&quot;)
                continue
            else:
                break

    def choose():
        global yourWish
        yourWish = input()
        while yourWish.lower() == (&quot;yes&quot; or &quot;y&quot;):
            print(&quot;Okay... calculating...&quot;)
            import time
            time.sleep(1)
            print()
            print(&quot;To be &quot; + str(desiredAge) + &quot;, you would have to wait &quot; + str(desiredAge - myAge) + &quot; years. &quot;)
            print()
            reDo()
            break
        else:
            print(&quot;Erm... please input your desired age now:&quot;)
            secondV()

    def reDo():
        print('Would you like to try again?')
        runBack = input()
        while True:
            if runBack.lower() in {'y', 'yes'}:
                print()
                main()
            else:
                print(&quot;Okay... Goodbye!&quot;)
                break

    print(&quot;You are &quot; + str(myAge) + &quot;.&quot;)
    print(&quot;What is your desired age? &quot;)
    desiredFuture()
    choose()
    print()


main()
You can try this:
import time, sys
# This program will prompt you to state your age and then will proceed to
# calculate how long till __ age


# Introduction
print(&quot;Hello. &quot;)

# Defining Functions
def main():
    while True:
        try:
            myAge = int(input(&quot;Please enter your age: &quot;))
        except ValueError:
            print(&quot;I'm sorry, please enter your age as a numeric value.&quot;)
            continue
        break

    def secondV():
        while True:
            try:
                global desiredAge
                desiredAge = int(input())
                print(f&quot;Do you wish to be {desiredAge}?&quot;)
                choose()
            except ValueError:
                print(&quot;Please enter a numeric value.&quot;)
                continue
            break

    def desiredFuture():
        while True:
            try:
                global desiredAge
                desiredAge = int(input())
                while True:
                    if desiredAge &lt; myAge:
                        print(&quot;Silly, time does not move backwards. Learn how to embrace the future, not fear it.&quot;)
                        print('Please input an age you wish to be in the FUTURE now...')
                        desiredFuture()
                        break
                    if desiredAge == myAge:
                        print(f&quot;You are already {desiredAge}&quot;)
                        break
                    else:
                        print(f&quot;Do you wish to be {desiredAge}?&quot;)
                        choose()
                        break
            except ValueError:
                print(&quot;Please enter a numeric value.&quot;)
                continue
            break

    def choose():
        global yourWish
        yourWish = input()
        while yourWish.lower() == (&quot;yes&quot; or &quot;y&quot;):
            print(&quot;Okay... calculating...&quot;)
            time.sleep(1)
            print()
            print(f&quot;To be {desiredAge} you would have to wait {desiredAge - myAge} years.&quot;)
            print()
            reDo()
            break
        else:
            print(&quot;Erm... please input your desired age now:&quot;)
            secondV()

    def reDo():
        print('Would you like to try again?')
        runBack = input()
        while True:
            if runBack.lower() in {'y', 'yes'}:
                print()
                main()
            else:
                print(&quot;Okay... Goodbye!&quot;)
                sys.exit(&quot;goodbye&quot;)
                break

    print(f&quot;You are {myAge}.&quot;)
    print(&quot;What is your desired age? &quot;)
    desiredFuture()
    choose()
    print()


main()

Use f strings instead of + it's more convenient.
And in the try except, you can just do break at the end, not put it in else. And it doesn't exit, so you can import sys and use sys.exit()
And do import time at the first line.