Activity 3.13
Source Code
import math
import random
# import dog
def main():
print("Main Menu")
print("E1 - Example 1")
print("Q - Quit")
done = False
while not done:
choice = input("Choice: ").upper()
if choice == "Q":
print("Quit!")
done = True
elif choice == "E1":
example1()
elif choice == "E2":
example2()
elif choice == "P1":
pass
elif choice == "P2":
pass
elif choice == "P3":
pass
elif choice == "P4":
pass
elif choice == "P5":
pass
elif choice == "P6":
pass
elif choice == "P7":
pass
elif choice == "P8":
pass
elif choice == "P9":
pass
elif choice == "P10":
pass
elif choice == "Q":
print("Quitting!")
done = True
else:
print("Invalid Choice")
# define Example 1 Function
def example1():
print("Example 1")
# create object
# define Example 1 Function
def example2():
print("Example 2")
# create counter object
# problem1 function definition
# problem2 function definition
# problem3 function definition
# problem4 function definition
# problem5 function definition
# problem6 function definition
# problem7 function definition
# problem8 function definition
# problem9 function definition
# problem10 function definition
# call to main function, do not delete!
main()
dog.py
# header
class Dog:
# constructor
# bark method
# __str__ method
Last updated