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
A ___ is a node (or a device) that connects two different networks together and allows them to communicate.
stellarik [79]

Answer:

The answer is Hub

Explanation:

A hub, also called a network hub, is a common connection point for devices in a network. Hubs are devices commonly used to connect segments of a LAN. The hub contains multiple ports. When a packet arrives at one port, it is copied to the other ports so that all segments of the LAN can see all packets.

7 0
3 years ago
Case 1-1Tom has just started working as an intern for a local radio station. He is responsible for managing the request line and
pantera1 [17]

Answer:

The answer is Live Preview.

Explanation:

<em>Live Preview is a Powerpoint tool that helps the user to find out how a singular choice will change the appearance of the presentation, without committing any change. This application allows the user to edit any slide and see the changes without any risk of damaging the rest of the presentation.</em>

<em>It lets the user see how an actual change will look on the slide  object before the user decides to accept or decline the change.</em>

<em>It is a powerful resource, because we know how handful it is to prepare a powerpoint presentation.</em>

3 0
3 years ago
What is the full form of EPROM (CLASS-6)
vodomira [7]

Answer:

earth planet rest orbit moon

4 0
2 years ago
Read 2 more answers
What is the difference between concrete language and abstract language? give an example of each.
saul85 [17]

The difference between abstract language and abstract language is that abstract language is known through the intellect and concrete language is known through the senses.

<h3>What are abstract and concrete languages?</h3>

The abstract language uses the words like kind, truth, grace, etc. It is a form of language that indicates the intellectual, but concrete language can be known by the senses.

Thus, the distinction between concrete and abstract language is that concrete language is understood via the senses, whereas abstract language is understood through the mind.

To learn more about abstract and concrete languages, refer to the link:

brainly.com/question/16550006

#SPJ4

7 0
1 year ago
How acid rain pollution will affect the food chain
babunello [35]

Explanation:

Acid rain can cause serious problems for many different animals and plants. As a result, the entire food web is affected. For example, acid rain can cause phytoplankton in lakes to die. Insects, which rely on phytoplankton for food, now have less food to eat, and they begin to die as a result.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that estimates the approximate number of times the user’s heart has beat in his/her lifetime using an average he
    12·1 answer
  • A program that interacts with another piece of software as it if were a human user is known as a(n) ________.
    5·1 answer
  • In which of the following situations should you expect to provide your Social Security number?
    13·1 answer
  • Comments should be written in what type of language
    6·1 answer
  • A network technician is designing a network for a small company. The network technician needs to implement an email server and w
    7·1 answer
  • What devices gives input​
    5·1 answer
  • Using direct mapping, consider a 16-bit memory addresses, and a cache with 64 blocks, where each block is 8 bytes. What is the s
    8·1 answer
  • How should work be allocated to the team in a Scrum project?
    13·1 answer
  • Which phrase is the best definition of sparklines in Excel 2016?
    8·2 answers
  • In a List of Positive Integers, Set MINIMUM to 1. For each number X in the list L, compare it to MINIMUM. If X is smaller, set M
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!