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
ahrayia [7]
3 years ago
13

There is a class called Roster whose constructor takes a List of tuples with the names of students and their grades in the class

, for example -- [('Richard', 98), ('Benny', 55), ('Katie', 87), ('Sally', 76)].
Create an instance of the Roster class, including the following students and their respective grades, and store it in the variable mathClass: Jacob, 65 Frankie, 86 Lina, 94 Arnold, 63 Amanda, 87
Computers and Technology
1 answer:
Marat540 [252]3 years ago
4 0

Answer:

mathClass = Roster([('Jacob', 65), ('Frankie', 86), ('Lina', 94), ('Arnold', 63), ('Amanda', 87)])

Explanation:

An Instance of a class, refers to making a new object of that class. They belong to the class from which they are derived. The meaning of this is that every instance of a class that is created, will have its own set of variables with different values initialized by the constructor call, so we can make several objects of a class and define their behavior. In this question, we are asked to make a new instance of the class Roster called mathClass and at the constructor call we pass the variables of this new object as an argument.  

You might be interested in
This is your code. >>> A = ['dog''red'] >>> B = [' cat', 'blue']>>>C = ['fish', 'green'] You can impl
natima [27]

Answer:

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

Explanation:

The given Python code is:

>>> A = ['dog''red']

>>> B = [' cat', 'blue']

>>>C = ['fish', 'green']

We can implement an array of this data by using the dictionary in Python.

Dictionary in python:

A dictionary in python stores (key-value) pairs. For example, we can implement the -given arrays A, B, and C in the dictionary as given below:

d={'dog : red', 'cat : blue', 'fish : green'}

print(d['dog']) # Get an entry from a dictionary; prints "red"

print('cat' in d)    # Check if a dictionary has a given key; prints "True"

d['fish'] = 'black'    # Set an entry in a dictionary

print(d['fish'])      # Prints "black"

# print(d['elephant'])  # KeyError: 'elephant' not a key of d

print(d.get('elephant', 'N/A'))  # Get an element with a default; prints "N/A"

print(d.get('fish', 'N/A'))   # Get an element with a default; prints "black"

del d['dog']        # Remove an element from a dictionary

print(d.get('dog', 'N/A')) # "dog" is no longer a key; prints "N/A"

3 0
3 years ago
Read 2 more answers
Two technicians are discussing the lower-end operation of an engine. Technician A says that power loads result from the expansio
notka56 [123]

Answer:

It's Both are correct.

Explanation:

I've taken test

6 0
3 years ago
NEED HELP ASAP! BRAINLIEST AND 20 PTS TO CORRECT ANSWER!
son4ous [18]

The correct answer is C.

8 0
3 years ago
Which sequence represents the hierarchy of terms, from smallest to greatest?
Anni [7]

Answer:

b

Explanation:

7 0
3 years ago
1. What is memory mapped I/O?
anzhelika [568]

Answer:

Memory-mapped I/O and port-mapped I/O are two complementary methods of performing input/output between the central processing unit and peripheral devices in a computer. An alternative approach is using dedicated I/O processors, commonly known as channels on mainframe computers, which execute their own instructions.

5 0
3 years ago
Other questions:
  • The source must decode a message before it can be sent. select one: <br> a. True <br> b. False
    7·1 answer
  • If the base-10 system stops with the<br> number 9, then why isn't it called<br> base-9?
    15·1 answer
  • . Virtualization simplifies the use of resources, isolates users from one another, supports replication and mobility, but exacts
    7·1 answer
  • To give your app users the ability to open your app directly from other apps by clicking a link, you should use:.
    11·1 answer
  • Please help me I need a help
    13·1 answer
  • How to fix a light blub
    11·2 answers
  • You have a host device with an assigned IP address of 192.168.15.100 and a subnet mask of 255.255.255.192. To what network does
    13·1 answer
  • This site isn't letting me add my ans and wut should I do?
    15·1 answer
  • **HELP ME PLS**
    15·1 answer
  • Greg is concerned about the use of ddos attack tools against his organization, so he purchased a mitigation service from his isp
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!