-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup_term.py
More file actions
59 lines (43 loc) · 1.19 KB
/
Copy pathsetup_term.py
File metadata and controls
59 lines (43 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
from datetime import datetime
from id import makeID
import json
print("Welcome to Assignment Tracker!")
print("Today we are going to set up your experience!")
print("")
setup = {}
mode = input("What mode would you like (dark or light): ")
setup["mode"] = mode
print(
"""Themes Available:
\tBlue
\tGreen
\tOrange
\tPurple
\tREd
\tTeal
\tYellow
\tGrey
""")
theme = input("Please choose a theme from above: ")
setup["theme"] = theme
print("")
numClasses = int(input("How many classes do you have (max 10): "))
if numClasses > 10:
print(f"Because you put {numClasses} classes it is set as 10")
numClasses = 10
setup["numClass"] = numClasses
print("")
for i in range(numClasses):
name = input("What is the class name: ")
subject = input("What is the class subject: ")
id = makeID()
setup[f"class{i}"] = {}
setup[f"class{i}"]["id"] = id
setup[f"class{i}"]["name"] = name
setup[f"class{i}"]["subject"] = subject
print(f"you finished setting up {i + 1} class(es)")
print("")
json_object = json.dumps(setup, indent=4)
with open("setup.json", "w") as outfile:
outfile.write(json_object)
print("Assign Tracker is all setup!!")