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
stira [4]
3 years ago
7

Assume you have the all_info list that is given in the Do It Now problem 1. This list includes the grades of 4 courses for 4 stu

dents. Write a code that asks a name from the user. Then it will search for that name in the list all info. Of the name exists in the list, the program will display the programming grade of that student. For example, if the user enters 'Sarah ' the program will display 90. If the user enters a name that is not in the list, such as 'Jack', the program will display an error message such as 'Sorry, but this student is not in the list'.
Computers and Technology
1 answer:
ludmilkaskok [199]3 years ago
3 0

Answer:

titles =['name', 'physics', 'chemistry', 'math', 'programming']

student_1 =['Kathy', 90, 80, 75, 100]

student_2 =['John', 65, 84, 79, 90]

student_3 =['Joe', 45, 89, 100, 10]

student_4 =['Sarah', 68, 89, 93, 90]

all_info =[titles, student_1, student_2, student_3, student_4]

student = input("Enter student's name: ")

student_list = [name[0] for name in all_info]

if student in student_list:

   print(all_info[student_list.index(student)][4])

if student not in student_list:

   print("Student name does not exist.")

   

Explanation:

The python program prompts for user input "student" and the input is used to search and return the result of the student in the programming exam. If the name is not in the student_list, the program print an error message.

You might be interested in
A research team is studying parallel computing. They want to run parallel processes without having to use multiple processors. H
valentina_108 [34]
D by using locks okkkkkkkk
6 0
3 years ago
Read 2 more answers
. What type of device is a computer? Where does it use?​
LenKa [72]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

Computer is an electronic and digital device. Computer can be used everywhere in our daily life. You can use a computer to search for something over the internet related to your study etc.

The following fields where you can see the use of computers.

  1. Education
  2. Business
  3. Hospital
  4. Banking sector
  5. Home
  6. Marketing
  7. Government offices
  8. etc

You can see the use of computers everywhere in our daily life.

7 0
3 years ago
Which of the following is designed to help an organization continue to operate during and after a disruption?
Olenka [21]

Answer:

d

Explanation:

cause people need a care for there incedents that not expected thats why people need help prevent from a risk to save people lives

7 0
3 years ago
Why did latex replace wax?
andrezito [222]

Answer:

Latex replaced wax because it did the same thing and was used for the same things that wax would be used for

Explanation:

3 0
3 years ago
The readline method of bufferedreader returns _____ when end of file is reached.
Misha Larkins [42]

Answer:

null

Explanation:

it does not turn to null value. It returns ;

when it reaches the end of the file

6 0
1 year ago
Other questions:
  • What were precomputed tables and why were they necessary?​
    12·2 answers
  • By applying styles, _______ formats are being applied each time. A. various B. different C. the same D. similar
    6·2 answers
  • Which key combination will allow users to move to the top of a document?
    15·1 answer
  • @anthonydboss23<br><br> it’s goldielove6 <br><br> .....this is not a question everyone ignore this
    11·2 answers
  • GPS data can be used to track the rate and direction of plate movement. If a GPS unit measures a latitude velocity of 28.2 mm/yr
    8·1 answer
  • Project manager George is defining project management to his team. How should he define project management in one sentence?
    7·1 answer
  • Design 3 classes: Computer - Superclass
    11·1 answer
  • What does not stand for​
    15·2 answers
  • A(n) ________ attempts to slow down or stop a computer system or network by sending repetitive requests for information.
    6·1 answer
  • PLEASE HELP! I accidently looked up a link, and now this same link keeps popping up everywhere, how do I stop this!?!? please he
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!