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
Tomtit [17]
3 years ago
9

python There is a reference variable office_a_c of type AirConditioner. Create a new object of type AirConditioner using the off

ice_a_c reference variable. After that, turn the air conditioner on using the reference to the new object.
Computers and Technology
1 answer:
Kay [80]3 years ago
8 0

Answer:

  1. class AirConditioner:
  2.  def __init__(self, a_c=False):
  3.    self.office_a_c = a_c  
  4. ac = AirConditioner()
  5. ac.office_a_c = True

Explanation:

Firstly, create a class and name it as AirConditioner (Line 1).

Next in the class constructor, create the reference variable office_a_c (Line 3). Please note the reference variable shall be preceded with a self keyword. Besides, the reference variable is set to False by default.

Create an AirConditioner object (Line 6) and then use the dot syntax (.) to set the object reference variable office_a_c to True.

You might be interested in
Design a GUI program to find the weighted average of four test scores. The four test scores and their respective weights are giv
Alexus [3.1K]

<u>Answer:</u>

I am writing <em>partial code in</em> <em>c++ to calculate weighted average</em>. The weighted average should be calculated based on multiplying the test score and its <em>respective weight and finally add all the test score.</em>

<u>Explanation:</u>

<em>int arrtestscore[100];</em>

<em>int arrweight[100];</em>

<em>int n;</em>

<em>double weightedavg;</em>

<em>cout<<”Enter the number of test score for which weighted average needs to be calculated”;</em>

<em>cin>>n;</em>

<em>for(int x = 0; x <n;x++)</em>

<em>{</em>

<em> cout<<”Enter test score :” + (x+1) ;</em>

<em> cin>>arrtestscore[x];</em>

<em> count<<”Enter the respective weight:”;</em>

<em> cin>>arrweight[x];</em>

<em>}</em>

<em>for (int i=0; i<n;i++)</em>

<em>{</em>

<em> weightedavg = weightedavg + (arrtestscore[i] * arrweight[i])</em>

<em>}</em>

<em>cout<<”weighted average = “ <<weightedavg; </em>

3 0
3 years ago
If given the chance to own manage a business,what will be the name of the business?
Nady [450]
This is honestly an answer you can give. What would you name a business if you made one?
7 0
3 years ago
Read 2 more answers
Which LIKE operator would match a single character?<br><br> *<br> ?<br> []<br> #
algol [13]

Answer:

underscore hope that helps

Explanation:

4 0
2 years ago
Once a business determines that change needs to occur, what ahould the
Lady bird [3.3K]

Answer:

D. Business strategy

Explanation:

Kono Dio Da!!

7 0
3 years ago
The case states that google intended the limited initial rollout to be a beta test of google glass, meaning that the adopters we
tigry1 [53]

Google intended the limited initial rollout to be a test of google glass, that the adopters were Innovators. The initial rollout of Google Glass was limited, purposefully so as to set the price very high. This mean that only a selected few, and those with plenty of disposable income, would be the first to use these devices. Google required people to register for the chance to receive a set. Even if many would want to spend the money on these devices, Google allowed only a selected few to receive them.

7 0
3 years ago
Other questions:
  • Which connector is most commonly used to connect printers to desktop pc systems?
    10·1 answer
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • What are the uses of a modem
    5·1 answer
  • Given two double variables, best value and second best value, write some code that swaps their values. declare any additional va
    13·1 answer
  • In this exercise, use the following variables : i,lo, hi, and result. Assume that lo and hi each are associated with an int and
    9·1 answer
  • Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the
    13·1 answer
  • Plzz help me with this question.........
    6·1 answer
  • 1.Which one of the following buttons returns a window to its original size?
    11·1 answer
  • c++ 4.17 LAB: Count characters Write a program whose input is a character and a string, and whose output indicates the number of
    14·1 answer
  • Which of the following could be part of an algorithm?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!