😎
CS1.dev
  • Welcome to Computer Science 1
  • Unit 2
    • Activity 2.1
    • Activity 2.2
    • Activity 2.3
    • Activity 2.4
    • Activity 2.5
    • Activity 2.6
    • Activity 2.7
    • Activity 2.9
    • Activity 2.10
    • Project 2
    • Activity 2.8
    • Activity 2.11
    • Activity 2.12
    • Activity 2.13
    • Activity 2.14
    • Activity 2.15
    • Activity 2.16
    • Activity 2.17
    • Activity 2.18
    • Activity 2.19
    • Project 3
    • Activity 2.20
    • Activity 2.21
    • Activity 2.22
    • Activity 2.23
    • Activity 2.24
    • Project 4
    • Activity 2.25
    • Activity 2.26
    • Activity 2.27
    • Activity 2.28
    • Project 5
    • Activity 2.29
    • Activity 2.30
    • Activity 2.31
    • Activity 2.32
    • Activity 2.33
    • Activity 2.34
    • Activity 2.35
    • Activity 2.36
  • Unit 3
    • Activity 3.1
    • Activity 3.2
    • Activity 3.3
    • Activity 3.4
    • Activity 3.5
    • Activity 3.6
    • Activity 3.7
    • Activity 3.8
    • Activity 3.9
    • Activity 3.10
    • Activity 3.11
    • Project 6
    • Activity 3.12
  • Activity 3.13
  • Activity 3.14
  • Activity 3.15
  • Activity 3.16
  • Project 7
  • Activity 3.17
  • Activity 3.18
  • Activity 3.19
  • Project 8
  • Linux
    • bash
    • cat
    • cd
    • chmod
    • df
    • echo
    • find
    • grep
    • less
    • ls
    • mkdir
    • more
    • pwd
    • tar
    • touch
    • unzip
    • zip
Powered by GitBook
On this page
  • Source Code
  • grades233.txt
  • sales233.txt
  • temperatures233.txt
  1. Unit 2

Activity 2.33

Source Code

import math
import random

def main():
    done = False
    while not done:
        print("Menu System")
        print("E1 - Example 1")
        print("Q - Quit")
        choice = input("Choice: ").upper()
        if choice == "E1":
            example1()
        elif choice == "E2":
            example2()
        elif choice == "E3":
            example3()
        elif choice == "P1":
            problem1()
        elif choice == "P2":
            problem2()
        elif choice == "P3":
            problem3()
        elif choice == "P4":
            problem4()
        elif choice == "P5":
            problem5()
        elif choice == "Q":
            print("Quitting!")
            done = True
        else:
            print("Invalid choice")

# example1 function definition
def example1():
    pass # remove

# example2 function definition
def example2():
    pass # remove

# example3 function definition
def example3():
    pass # remove

# problem1
def problem1():
    print("Problem 1")

# problem2
def problem2():
    print("Problem 2")

# problem3
def problem3():
    print("Problem 3")

# problem4
def problem4():
    print("Problem 4")

# problem5
def problem5():
    print("Problem 5")



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

grades233.txt

87
92
76
54
89
65
73
81
50
98
67
88
74
79
98
62
91
45
68
86
94

sales233.txt

105.47
250.32
489.78
320.15
768.52
198.43
540.89
623.25
710.34
890.96
134.58
578.63
620.74
430.29
315.80
912.50
830.21
550.06
790.99
267.45
512.87
692.48
359.02
925.64
773.38
658.92
482.06
246.79
699.31
345.23

temperatures233.txt

72
74
78
80
77
73
75
82
84
79
76
74
78
81
83
80
79
76
77
82
83
81
75
74
78
80
82
79
77
75
PreviousActivity 2.32NextActivity 2.34

Last updated 3 months ago