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
adell [148]
4 years ago
7

What is a relationship between a object and a class?

Computers and Technology
1 answer:
Mrrafil [7]4 years ago
8 0

A. An object is an instance of a class. The class is like the recipe to create (multiple) objects.

You might be interested in
1 #Write a function called phonebook that takes two lists as
Nesterboy [21]

Answer:

I am writing a Python program.

def phonebook(names, numbers):  #method phonebook that takes two parameters i.e a list of names and a list of phone numbers

   dict={}  #creates a dictionary

   for x in range(len(names)):  # loop through the names

       dict[names[x]]=numbers[x]  #maps each name to its phone number

   return dict #return dictionary in key:value form i.e. name:number

#in order to check the working of this function, provide the names and numbers list and call the function as following:

names = ['Jackie', 'Joshua', 'Marguerite']

numbers = ['404-555-1234', '678-555-5678', '770-555-9012']

print(phonebook(names, numbers))

Explanation:

The program has a function phonebook() that takes two parameters, name which is a list of names and numbers that is a list of phone numbers.

It then creates a dictionary. An empty dictionary is created using curly brackets. A dictionary A dictionary is used here to maps a names (keys) phone numbers (values) in order to create an unordered list of names and corresponding numbers.

for x in range(len(names)):  

The above statement has a for loop and two methods i.e. range() and len()

len method is used to return the length of the names and range method returns sequence of numbers just to iterate as an index and this loops keeps iterating until x exceeds the length of names.

dict[names[x]]=numbers[x]

The above statement maps each name to its phone number by mapping the first name with the first  umber, the second name with the second number and so on. This mapping is done using x which acts like an index here to map first name to first number and so on. For example dict[names[1]]=numbers[1]  will map the name (element) at 1st index of the list to the number (element) at 1st index.

return dict retursn the dictionary and the format of dictionary is key:value where key is the name and value is the corresponding number.

The screenshot of the program and its output is attached.

7 0
3 years ago
Quick please, URGENT
Serjik [45]

Answer: it is the code it is wrong

Explanation:

8 0
3 years ago
Nappropriate use of technology makes it easier for cyber bullies to <br> others.
Alex
Inappropriate*
And yes
It does make it easier.
6 0
4 years ago
Read 2 more answers
Do all shoes have animation
Romashka-Z-Leto [24]
No probably not to be honest
6 0
3 years ago
Researchers today can use technology such as CAT scans and fMRI scans to measure brain activity. Some researchers ask their subj
Lerok [7]

Answer:

Introspection , Titchener

Explanation:

7 0
3 years ago
Other questions:
  • A ____ is a prewritten formula that is built into excel.
    6·1 answer
  • In the context of web and network privacy issues, new employees in an organization have to sign a(n)__________ before they acces
    15·2 answers
  • Public static void prefixmerge(customer[] list1, customer[] list2, customer[] result {
    6·1 answer
  • In Vista and Windows 7, the Appearance and Personalization option allows you to change the
    14·1 answer
  • 50 POINTS!!!!
    8·1 answer
  • Write a method called printRange that accepts two integers as arguments and prints the sequence of numbers between the two argum
    6·1 answer
  • AddAll - Adds all the doubles in the string with each other. Note every double is separated by a semi-colon. AddAll("1.245;2.9")
    6·1 answer
  • Hardware is defined as the physical parts of a computer
    15·1 answer
  • Given a member function named set_age() with a parameter named age in a class named Employee, what code would you use within the
    10·1 answer
  • What are the 2 levels of formatting in a word document
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!