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 report on the effectiveness of using thicker bags. Remember to include the effect on the environment and the economy in
malfutka [58]

The effectiveness of using thicker bags are:

  • It has the lowest environmental impact in terms of any other disposable bag.
  • It can be used three to six more times.
  • It is environmentally sustainable.

<h3>What is the effect of thicker plastic bags have on the environment?</h3>

The use of plastic bags is known to have some form of detrimental effects on the such as animal choking, pollution, and others.

Conclusively, Note that thicker bags needs a lot of plastic to be able to produce it and it goes to waste even if a person do not use it again.

Learn more about environment from

brainly.com/question/17413226

4 0
2 years ago
Create a program in Matlab that prints the numbers from 1-100.
Burka [1]

Answer:

numbers = 1:1:100;

for num=numbers

remainder3 = rem(num,3);

remainder5 = rem(num,5);

 

if remainder3==0

disp("Yee")

else

if remainder3 == 0 && remainder5 == 0

disp ("Yee-Haw")

else

if remainder5==0

disp("Haw")

else

disp("Not a multiple of 5 or 4")

end

end

end  

end

Explanation:

  • Initialize the numbers variable from 1 to 100.
  • Loop through the all the numbers and find their remainders.
  • Check if a number is multiple of 5, 3 or both and display the message accordingly.
4 0
3 years ago
Some systems provide file sharing by maintaining a single copy of a file. Other systems maintain several copies, one for each of
Natalka [10]

Answer:

Explanation:

When you have a single copy, a large number of concurrent updates that are supposed to go to a file may result in the user obtaining incorrect information. This incorrect information obtained them leads to the file being left in an incorrect state. When you have a lot of or multiple copies, then storage waste exist and the various copies might happen not to be consistent with respect one other. In summary, what happens is that

a) Using one copy saves space, but also the change might have an effect on all the users.

b) Using multiple copies avoids eliminates the change problem, while creating its own problems, using more space.

3 0
2 years ago
While the economy of eastern Washington relies on farming, western Washington relies on technology.
Strike441 [17]
True- western Washington hosts modern technologies supporting both academic and co curricular activities
3 0
2 years ago
Read 2 more answers
When you code a column list in an INSERT statement, you can omit columns with default values and columns that allow ____________
stiks02 [169]

Answer:

NULL is the correct answer of this question.

Explanation:

The insert statement is used for inserting a column list into the database this statement is an under Data Manipulation language.When we insert any column into the database there is always a null value stored.

  • Insert statement is used to insert the data into the database .
  • To insert data following syntax is used:-

         insert into tablename (column data type).

  • When we insert any data into the database the default value is stored is bull.
6 0
3 years ago
Other questions:
  • The program prompts the user to interactively enter eight batting averages, which the program stores in an array. The program sh
    9·1 answer
  • ​a(n) ____ is a communications device that connects a communications channel such as the internet to a device such as a computer
    11·1 answer
  • Up to 10 people is a good guideline for the size of your study group.
    15·1 answer
  • 1. In the.js file, write the JavaScript code for this application. Within the click event handlers for the elements in the sideb
    14·1 answer
  • Trish has bought a new computer that she plans to start working on after a week. Since Trish has not used computers in the past,
    10·1 answer
  • Give sally sue specific suggestions on how she can improve her powerpoint skills
    5·1 answer
  • How do I mirror cast my smart lg tv?​
    11·1 answer
  • Write a method that computes the sum of the digits in an integer. Use the following method header: public static int sumDigits(l
    5·1 answer
  • 4.8 code practice question 2
    10·1 answer
  • Please help! first one to answer correctly gets brainliest and thanked
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!