Ive just started making a (very basic, im new to python) student database which you can insert students and details or view students and their details. Here's the code so far -
name = []
age = []
year = []
chosen_subjects =[]
classroom=[]
seat_number=[]
comments=[]
student = [name, age, year, chosen_subjects, classroom, seat_number, comments]
print ("Welcome to Student Database")
print()
while True:
eorv = input("Press E to enter a new student or V to view existing students ")
print()
if eorv == "E" or "e":
ename = input("Enter student's name")
name.append(ename)
eage = input("Enter student's age")`
age.append(eage)
eyear = input("Enter student's year")
year.append(eyear)
echosen_subjects = input("Enter student's chosen subjects")
chosen_subjects.append(echosen_subjects)
eclassroom = input("Enter student's classroom")
classroom.append(eclassroom)
eseat_number = input("Enter student's seat number")
seat_number.append(eseat_number)
ecomment = input("Enter any comment about this student")
comments.append(ecomment)
This seems to be where the problem is
elif eorv == "V" or "v":
print (student)
When "V" is pressed, it just asks all the questions from "E". Im not sure why this is, can someone help?