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
babymother [125]
3 years ago
10

I am writing a Python code to ask a user to enter students' information including name,

Computers and Technology
1 answer:
White raven [17]3 years ago
7 0

Answer:

student_file = {}

endf_input = '1'

for x in iter(list, 1):

   name = input("Enter a student name: ")

   st_id = int(input("Enter a student id number: "))

   student_file[name] = st_id

   endf_input = input("Add more student to file (type 1 for yes and 0 to end): ")

   if endf_input == '0':

       break

print("Search for Student")

search = int(input("Enter student id: "))

if search == 0:

   print("Sorry, no student with id of zero.")

   quit()

for key, value in student_file.items():

   if value == search:

       print(f"Student name: {key}")

Explanation:

The program source code uses a for loop to continuously add data to the student file dictionary structure but breaks from the loop when a zero is received as input. The program enters search mode and returns the name of the student with the searched id number.

You might be interested in
Post back maintains view state by assigning the form values to a hidden form field named ____.
garri49 [273]

By assigning the form data to a hidden form field called View State, Post back keeps track of the view state.

<h3>What is the meaning of postback?</h3>
  • A postback in web development is an HTTP POST to the page where the form is located.
  • In other words, the form's contents are POSTed back to the form's URL.
  • Post backs frequently occur in edit forms when a user enters data and then clicks "save" or "submit," triggering a postback.
  • A string of data called a postback event is sent to a network's unique URL and provides details about the post-install event relevant to the network.

To learn more about  View State,, refer to:

brainly.com/question/13107415

#SPJ4

4 0
2 years ago
Read 2 more answers
________ work(s) by using radio waves to communicate with radio antennas placed within adjacent geographic areas.
RSB [31]
Cell phones work(s) by using radio waves to communicate with radio antennas placed within adjacent geographic areas.
4 0
3 years ago
Describe five different ways databases can be processed
Tresset [83]
The five different ways databases can be processed are :
1) Queries, Forms and Reports
2) Application Programs
3) Stored Procedures
4) Triggers
5) Web Applications
6 0
3 years ago
George wants to pursue a career in web technology as a web developer. Which certifications can help him as a web developer?
skelet666 [1.2K]

Answer:Google Analytics IQ.

he can use this

Explanation:

3 0
3 years ago
Which composer below was not part of the classical period? <br> A. Beethoven B. Bach<br> C. Mozart
castortr0y [4]

Explanation:

B. Bach

Thanks for your point

3 0
3 years ago
Other questions:
  • If you were to conduct an Internet search on vegetarian restaurants, which of the following searches would be the best
    7·1 answer
  • Exploring Arraylists. Remember that arraylists are good for adding and removing things, and that they are clock-cycle friendlier
    13·1 answer
  • a) Before writing any code, you should go through a design process. Try to do so carefully – either follow a top-down approach,
    15·1 answer
  • Which of these is an expansion slot type?
    5·1 answer
  • In working on the conceptual design of the new database, Ken determines that the "office" field in one of the tables must includ
    8·1 answer
  • Liquid-liquid extraction is best suited to separate a mixture of compounds when:
    9·1 answer
  • If a student passes off an author’s work as his or her own, the student has
    6·1 answer
  • Write programs in python to display “Valid Voter”. (condition : age of person should be
    15·1 answer
  • What best describes the ability to increase the access to server resources and provide fail-safe services by linking two or more
    13·1 answer
  • Mack signs into his laptop and gets a message saying all his files have been encrypted and will only be released if he sends mon
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!