chevron_left chevron_right
Login Register invert_colors photo_library
Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 0 Vote(s) - 0 Average


Project HAKKIT filter_list
Author
Message
RE: Project HAKKIT #2
Instead of your way of reloading and closing the program, you can just define everything as a function and recurse.

For example:
Code:
## untitled.py

def main():
    l = input("What letter do you want the number of? ")
    l = l.lower()
    print( "The letter " + l + " is letter number " + str(ord(l)-96) )

    decision = input("Would you like to get the number of another letter?(y/n) ").lower()

    if( decision == "y" ):
        main()
        return
    else:
        return

    print("This is never ran.")
    
main()

## <3 W00t
micrictor@creep.im

Reply




Messages In This Thread
Project HAKKIT - by Stocking - 01-27-2014, 03:56 AM
RE: Project HAKKIT - by w00t - 01-27-2014, 04:43 AM
RE: Project HAKKIT - by cr33pyguy - 01-27-2014, 10:11 PM
RE: Project HAKKIT - by gentoo_fetishism - 01-27-2014, 10:20 PM



Users browsing this thread: 1 Guest(s)