Project 3

Source Code

import random

def main():
    print("My Name: ")
    print("Project 3 - The Adventures of...")

    # items list
    items = ["Python Book"]
    points = [100]

    done = False
    while not done:
        print("S - Start")
        print("Q - Quit")
        choice = input("Choice: ")
        if choice == "S":
            start(items, points)
        elif choice == "Q":
            print("Quitting!")
            done = True
        else:
            print("Invalid choice")

# start function definition
def start(items, points):
    print("It was a dark and stormy night.")
    print("Not a programmer was stirring, not even a..")
    print("Here's what you have so far.")
    print("Items:", items)
    print("Points:", sum(points)) # prints the total of your points
    print("Where do you want to go next?")
    choice = input("> ")



# call the main function, do not delete!
main()

Last updated