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]
3 years ago
5

Need some help writing a simple PYTHON Student registration program:

Computers and Technology
1 answer:
Y_Kistochka [10]3 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
(40 pointsAnd brainliest answer ASAP) Maria is recording her friend’s graduation ceremony. How can Maria ensure that the video i
Elodia [21]

Answer:  there is a red "Tally light" that lights up and tell you if it is recording.

Explanation:

3 0
4 years ago
Which element is the first thing you should complete when making a movie?
AlekseyPX

Answer:

storyboard!!!

Explanation:

its important to have the concept in mind before starting

6 0
3 years ago
Read 2 more answers
Use Python programming (or Excel) to analyze and plot a real equilibrium sedimentation equilibrium experiment. The data are from
Nady [450]

Answer:The allosteric inhibitors of integrase (termed ALLINIs) interfere with HIV replication by binding to the viral-encoded integrase (IN) protein. Surprisingly, ALLINIs interfere not with DNA integration but with viral particle assembly late during HIV replication. To investigate the ALLINI inhibitory mechanism, we crystallized full-length HIV-1 IN bound to the ALLINI GSK1264 and determined the structure of the complex at 4.4 Å resolution. The structure shows GSK1264 buried between the IN C-terminal domain (CTD) and the catalytic core domain. In the crystal lattice, the interacting domains are contributed by two different dimers so that IN forms an open polymer mediated by inhibitor-bridged contacts; the N-terminal domains do not participate and are structurally disordered. Engineered amino acid substitutions at the inhibitor interface blocked ALLINI-induced multimerization. HIV escape mutants with reduced sensitivity to ALLINIs commonly altered amino acids at or near the inhibitor-bound interface, and these substitutions also diminished IN multimerization.

Explanation:

6 0
3 years ago
∀פפIN∀W∀ qwda dawdawdawdawd<br> BAN ME NOW
Dvinal [7]

Answer:

why

Explanation:

6 0
3 years ago
ANSWER QUICKLY!!! <br><br> What is an advantage of digital portfolios?
algol13
Easy to carry or utilize
8 0
2 years ago
Other questions:
  • Write a SELECT statement that returns an XML document that contains all of the invoices in the Invoices table that have more tha
    8·1 answer
  • If you quote an author from a website in a paper, it will be important to create a _____ in your writing to give them credit for
    7·2 answers
  • Norman Bates has a very unusual hobby what is it?
    13·1 answer
  • Convert the following C program to C++.
    9·1 answer
  • What are the advantages of using an external style sheet?
    9·1 answer
  • What is an appropriate action when an email thread becomes long?
    6·1 answer
  • Create a dynamic array of 100 integer values named myNums. Use a pointer variable (like ptr) which points to this array. Use thi
    6·1 answer
  • An intruder with malicious intent breaks into an office and steals a hard drive containing sensitive information about the compa
    12·1 answer
  • V. ASSESSMENT (Time Frame:
    7·1 answer
  • Machine language is the set of binary-coded instructions that are executed directly by a computer. True or false
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!