Adding an ID to student name list
SakuraKimiko (4)

Hello

I am trying the following code and to do the follows in PYTHON CODE

  1. I want to start adding student by starting a blank list along with auto generated student ID i.e when once the students joins the site or program, a student no is generated e.g 001 and when the next student joins in , his or her id will become 002 meaning the ID's are generated in series.
  2. How can once create user id using python coding. e.g. once you are joining the program and they ask for personal information. Once the user himself or herself provides a user id (when asked i.e userid=input(""Your user id is:- ")). Can that ID be used to login rather than the name itself

  3. What would be the coding when two people have the same name or user id

Kindly reply all of the above questions in python (as much as possible) because currently I am only learning python.

Thank You for your time

Sakura

You are viewing a single comment. View All
SakuraKimiko (4)

@CaptainAnon

Thank you for your prompt response, Can you kindly tell me where exactly can we apply the 1st code i.e student_list = {[ id:...}] in the following code

blank student list

student_list=[{"Name":}]

student_list= [{"":[]}]

welcome to the site

print ("***Welome***")

#ask if he or she is a student

already_student=("Are you a member:- ")

if already_student=="YES" or already_student=="yes" or already_student=="Yes" or already_student=="Y" or already_student=="y":

print ("Welcome", already_student)

else:

print ("Member not found")

do you wish to become a memeber

member=input("Do you wish to become a member:- ")

if member=="YES" or member=="yes" or member=="Yes" or member=="Y" or member=="y":

name = input("Enter your First Name:- ")

last = input("Enter your Last Name:- ")

enter age

age=int(input("Enter your age here:- "))

student id generator

greet new student and inform of their id

print ("Welcome", name, "Your student ID is ", ID)

thank you again for your time