edit user IO

This commit is contained in:
tstst334
2019-07-30 07:43:42 -07:00
parent f5259dfe8e
commit a9882dbd77
+7 -8
View File
@@ -1,4 +1,4 @@
def userinput():
def user_input():
print("Hi User, \n do you want to edit your grades?")
todo = input("Ok, do you want to see them or to edit them? [see/edit]\n")
if todo == "see":
@@ -7,19 +7,18 @@ def userinput():
return "output", subject
elif todo == "edit":
print("Do you want to add a subject, a category or a grade? [subject/category/grade]")
useradd = input()
if useradd == "subject":
user_add = input()
if user_add == "subject":
subject = input("Which subject do you want to add? \n")
return "input", subject
elif todo == "category":
elif user_add == "category":
subject = input("To which subject do you want to add the category? \n")
category = input("Which category do you want to add? \n")
rating = float(input("Rating? \n"))
return "input", subject, category, rating
elif todo == "grade":
elif user_add == "grade":
subject = input("To which subject do you want to add the grade? \n")
category = input("To which category do you want to add it? \n")
grade = input("Grade? \n")
gradename = input("What's the name of the grade? \n")
return "input", subject, category, grade, gradename
grade_name = input("What's the name of the grade? \n")
return "input", subject, category, grade, grade_name