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

Declare a class named PatientData that contains two attributes named height_inches and weight_pounds. Sample output for the give

n program with inputs: 63 115 Patient data (before): 0 in, 0 lbs Patient data (after): 63 in, 115 lbs 1 Your solution goes here ' 2 1 test passed 4 patient PatientData () 5 print('Patient data (before):, end-' ') 6 print(patient.height_inches, 'in,, end=' ') 7 print(patient.weight_pounds, lbs') All tests passed 9 10 patient.height_inches = int(input()) 11 patient.weight_pounds = int(input()) 12 13 print('Patient data (after):', end-' ') 14 print (patient. height_inches, 'in,', end- ') 15 print(patient.weight_pounds, 'lbs') Run

Computers and Technology
1 answer:
Oksanka [162]3 years ago
4 0

Answer:

class PatientData():    #declaration of PatientData class

   height_inches=0  #attribute of class is declared and initialized to 0

   weight_pounds=0 #attribute of class is declared and initialized to 0

Explanation:

Here is the complete program:

#below is the class PatientData() that has two attributes height_inches and weight_pounds and both are initialized to 0

class PatientData():  

   height_inches=0

   weight_pounds=0  

patient = PatientData()  #patient object is created of class PatientData

#below are the print statements that will be displayed on output screen to show that patient data before

print('Patient data (before):', end=' ')

print(patient.height_inches, 'in,', end=' ')

print(patient.weight_pounds, 'lbs')

#below print  statement for taking the values height_inches and  weight_pounds as input from user

patient.height_inches = int(input())  

patient.weight_pounds = int(input())  

#below are the print statements that will be displayed on output screen to show that patient data after with the values of height_inches and weight_pounds input by the user

print('Patient data (after):', end=' ')

print(patient.height_inches, 'in,', end=' ')

print(patient.weight_pounds, 'lbs')      

Another way to write the solution is:

def __init__(self):

       self.height_inches = 0

       self.weight_pounds = 0

self keyword is the keyword which is used to easily access all the attributes i.e. height_inches and weight_pounds defined within a PatientData class.

__init__ is a constructor which is called when an instance is created from the PatientData, and access is required to initialize the attributes height_inches and weight_pounds of PatientData class.

The program along with its output is attached.

You might be interested in
Brenda's meeting with the web developer of her retail website concerning the integration of conversion tracking using Google Ads
RideAnS [48]

The web developer needs to have Brenda's Auto-tagging turned on in all of her Google Ads.

Explanation:

Auto-tagging features when turned on are able to track conversions on your website. Auto–tagging when combined with conversion tracking using Google Ads helps you see how effective your ad clicks are from potential customers. If Brenda’s auto-tagging is enabled, a Google Click Identifier will be registered and stored in what developers call Google Analytics. Brenda will then be able to go to Google Analytics and see customer clicks for website’s purchases, downloads, and more. By default, auto-tagging is turned. To turn it on, the web developer needs to

Sign into Brenda's Google ad account

Click settings in the left pane and select account settings

The web developer would then be able to enable auto-tagging and save the settings.

Learn more about Google Analytics and its connection to conversion tracking

brainly.com/question/13234037

brainly.com/question/14280673

#LearnWithBrainly

4 0
4 years ago
Ellen's laptop has a built-in 802.11n-capable wireless NIC. The wireless NIC worked perfectly yesterday when she loaned it to he
Flura [38]

Answer:

The NIC is disabled in CMOS

Explanation:

CMOS refers to the Complementary Metal Oxide Semiconductor.  It is a technology that is used to generated integrated circuits.

It can be found in various types like microprocessors, batteries, etc

While on the other hand the NIC refers to the network interface controller in which the component of the computer hardware has connected the computer to its network. It can be done via wired and wireless.

Since in the given situation, it is mentioned that Ellen is not able to access the internet through wireless NIC neither it is visible in network connections nor it is shown in device manager so first she assumes that is nic is disabled in CMOS

and the same is to be considered

6 0
3 years ago
Your laptop doesn���t have a serial port. what type of connector will your laptop require?
hodyreva [135]
Order a disk to program the lap top to use Wi-Fi
6 0
4 years ago
Read 2 more answers
UPS or FedEx plays what role in the supply?
nikdorinn [45]

Explanation:

the answer in the image above

8 0
2 years ago
What was your first experience with listening to kpop?
Verizon [17]

Answer:

My first experience with kpop was when I was six I just danced to it lol I forgot the name of the song but it was funny watching the video of me.

Explanation:

8 0
3 years ago
Read 2 more answers
Other questions:
  • The house had a wonderful pool of ... (his/its/our) own.​
    5·1 answer
  • What is the difference between a learner’s license and a driver’s license?
    12·1 answer
  • You approach a railroad crossing with a cross buck sign that has no light or gates . What should you do ?
    5·1 answer
  • 19. Which network topology is a combination of two or more types of physical or two or more types of logical topologies? A. Poin
    8·1 answer
  • A ___________ lists all possible packet switches and gives a next hop for each.
    12·1 answer
  • What layer uses the UDP protocol
    6·1 answer
  • 9. DIMMs used in servers can provide additional reliability if they use what specific technology.
    8·1 answer
  • Which of the following actions would not reduce software piracy? reducing the cost of software. offering downloads of software.
    12·2 answers
  • I need help converting this to python but i have no idea how to.
    12·1 answer
  • What are the different types of topology?​ in details
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!