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
Write a file path for a document file that is saved on the F drive then a folder called homework, then a folder called math. The
ad-work [718]
F:\homework\math\<span>fraction_hw.docx</span>
7 0
3 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
Rudiy27

Answer:

<em>A. check box </em>

Explanation:

A check box, selection box, or tick box <em>is a small immersive box that the user can switch to demonstrate an affirmative or negative choice</em>.

It is often observed in applications and operating systems ' HTML input forms, dialog boxes, and GUIs.

A check mark appears inside the box when clicked to signify an affirmative (yes) option. The check mark will vanish when clicking again, suggesting a negative option (no).

6 0
3 years ago
Definition of laptop
zaharov [31]
A device that sucks bc mien broke
7 0
2 years ago
Read 2 more answers
HELP PLEASE
atroni [7]

Answer: The role of a public relations manager is to keep the image of a celebrity, politician, ect. good so that they can keep their career going while constantly in the eye of the public. Public figures may find this useful because it can help them keep their record clean and have a personal life while also making it seem like they are perfect people to their audience, which in hand can help with business.

Explanation:

5 0
2 years ago
20 points<br><br> In what ways is the human brain like a computer? In what ways is it different?
mojhsa [17]

Answer:

Alright imma explain below

Explanation:

It it’s similar because both give info. Also the reaction time on both are fast. They are different in some ways too. A computer runs on electricity but the brain doesn’t. A brain can actually think but a computer can not.

Hope this helps

8 0
3 years ago
Read 2 more answers
Other questions:
  • What information is required for a complete citation of a website source?
    8·2 answers
  • Which of these is a social consequence of effective communication
    12·1 answer
  • You want to use a wireless keyboard and mouse with your laptop computer. which method should you use
    11·1 answer
  • Write an application named EnterUppercaseLetters that asks the user to type an uppercase letter from the keyboard. If the charac
    5·1 answer
  • If a 120 V appliance requires 15 A to operate, what is the resistance of the appliance?
    10·1 answer
  • Once secured a wheelchair may move up to 6 inches in any direction
    6·1 answer
  • I WILL GIVE BRAINLIEST TO WHO ANSWERS FIRST AND CORRECTLY.
    6·2 answers
  • Two types of formulas in Excel, what are they? A. Complex and simple, B. General and currency, C. Logical and Boolean, D. Trig a
    15·1 answer
  • Which of the following statements is true regarding a user account? Once a user account has been created, it cannot be completel
    8·1 answer
  • Jill is configuring the AutoArchive feature in Outlook 2016. What is the default setting in relation to when AutoArchive
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!