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
avanturin [10]
4 years ago
6

Suppose there is a class Roster. Roster has one variable, roster, which is a List of tuples containing the names of students and

their number grades--for example, [('Richard', 90), ('Bella', 67), ('Christine', 85), ('Francine', 97)]. Roster has a function findValedictorian that returns the name of the student with the highest grade. Find the valedictorian of the Roster object englishClass and store it in the variable valedictorian.
Computers and Technology
1 answer:
Ahat [919]4 years ago
7 0

Answer:

class Roster:

   def __init__(self,student):

       self.student = student

   def findValedictoian(self):

       

       highscore = 0

       studentList=[]

       bStudent = []

       valedictorian =''

       for pupil in self.student:

           if pupil[1] > highscore:

               highscore = pupil[1]

              valedictorian = pupil[0]

       return valedictorian

   

student = [('rich', 90), ('Bella', 67),('philip', 56)]

englishClass= Roster(student)

print(englishClass.findValedictoian())

Explanation:

we define the roster class using the class keyword, within the class we have our __init__ constructor and we initialize the variable student.

A class method findValedictoian is defined and it compares the grades of each student and returns the name of the student with the highest grade.

An instance is created for English class and the findValedictorian method is called and the valedictorian is printed to the screen.

You might be interested in
Please help me!!
Alona [7]
Page layout and header i think is correct 
5 0
3 years ago
Select the correct answer.
Veronika [31]
I think it’s c. llS....
6 0
3 years ago
Read 2 more answers
What is the service provided by a third party (such as an ISP) that enables you to connect another cloud directly to your Google
Olenka [21]

Answer:

A. Dedicated interconnect

Explanation:

With dedicated interconnect, there is a direct connection between your network and that of Google. It enables you to connect another cloud directly to your Google cloud resources to create hybrid cloud solutions. In other words, Dedicated Interconnect enables hybrid networking. Businesses can now extend their own private cloud into Google's cloud so they can switch control between the two with little latency. This gives them (businesses) control over the amount of data entering into the two clouds.

8 0
4 years ago
Remember not to use tools that are ________ in any way.
kupik [55]
Remember not to use tools that are rusty and damaged in any way.
3 0
3 years ago
how old is the letter 3 on its 23rd birthday when your car turns 53 and your dog needs gas and your feet need lave then when is
forsale [732]

Answer:

ummm...idr.k..u got me....wat is it

Explanation:

8 0
3 years ago
Other questions:
  • You can increase your efficiency by using your e-mail program's spell checker because it eliminates the need for you to proofrea
    11·1 answer
  • To save the changes to the layout of a table, click the Save button on the _____.
    13·1 answer
  • Write a program that calculates the occupancy rate for each floor of a hotel. The program should start by asking for the number
    10·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • What is the difference between a software engineer and a system analyst?
    8·1 answer
  • The ELECTRONIC COMMUNICATIONS PRIVACY ACT prohibits unauthorized eavesdropping by all persons, businesses, and the government.
    5·1 answer
  • Write regular expressions for the following languages:
    5·1 answer
  • When was the very first computer made??
    5·1 answer
  • Signals that can travel in only one direction on a medium are referred to as what type of signal?
    12·1 answer
  • The term callee save denotes the case where the __________ (calling / called) program saves the contents of registers whose cont
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!