1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
trapecia [35]
2 years ago
5

Need some help writing a simple PYTHON Student registration program:

Computers and Technology
1 answer:
Y_Kistochka [10]2 years ago
6 0

import random

database = {}

while True:

   try:

       user_choice = int(input("Enter your student id to bring up your information (Press enter if you don't have one) : "))

       if user_choice in database:

           print("Student ID:",database[user_choice][0],"\nFirst name:",database[user_choice][1],"\nLast name:",database[user_choice][2],"\nPhone number:",database[user_choice][3],"\nEmail address:",database[user_choice][4],"\nPassword:",database[user_choice][5],"\nPoints:",database[user_choice][6])

   except ValueError:

       name = input("Enter your first name: ")

       last_name = input("Enter your last name: ")

       phone_number = input("Enter your phone number: ")

       email = input("Enter your email address: ")

       password = input("Enter a password: ")

       points = 100

       student_id = random.randint(1,1000)

       while student_id in database:

           student_id = random.randint(1,1000)

       print("Hello,",name,"your student ID is:",student_id)

       database[student_id] = [student_id,name, last_name, phone_number, email, password, points]

I wrote my code in python 3.8. I hope this helps.

You might be interested in
Which of the following is true about advertisements?
katrin [286]

the answer is they often contain biases :)

3 0
2 years ago
When a user problem cannot be solved by the help desk at the first level of resolution, the problem is ___________ to the second
PIT_PIT [208]

Answer: escalated

Explanation:

7 0
2 years ago
What are the 3 attributes of information?
Anton [14]

As previously said, the three highly important qualities of validity, accuracy, and completeness can be expanded into the information quality of integrity.

For information to be valuable and to meet the definition of information, it must largely have the characteristics of relevance, availability, and timeliness. Accuracy, completeness, consistency, distinctiveness, and timeliness are five qualities of high-quality information. For information to be accurate and valuable, it must be of high quality. Standard attributes, commonly referred to as global attributes, work with a wide variety of elements. The essential attributes such as accesskey, class, contenteditable, contextmenu, data, dir, hidden, id, lang, style, tabindex, and title are included in them.

Learn more about information here-

brainly.com/question/5042768

#SPJ4

4 0
1 year ago
What lets you do many things, like write book reports and stories?
Marina CMI [18]
A -
Application programs
8 0
2 years ago
Read 2 more answers
Write a report on the recent online tuition
ale4655 [162]

Answer:

dgvhgfh

Explanation:

fghdfgh

8 0
3 years ago
Other questions:
  • Carly is part of a community of developers. In her free time, she works on code to improve this open-source operating system. Th
    11·1 answer
  • In which part of a browser will you type the url of a website
    11·1 answer
  • It is important to verify internet source because-------- choose that apply. A.the source should be written by real author. B.an
    6·2 answers
  • To view the results of a query, open it by pressing and holding or right-clicking the query in the navigation pane and tapping o
    10·1 answer
  • Computers help eliminate the repetitiveness of manual tasks. How can this benefit you in your overall career?
    9·2 answers
  • True or False <br><br> Rootkits are only made by black-hat hackers.
    8·1 answer
  • How to change color of object in photoshop?
    10·2 answers
  • Discuss how sentiment analysis works using big data?<br>​
    13·1 answer
  • List the difference between GIGO and bug ​
    15·1 answer
  • 1. What are the two main functions of an operating system?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!