Declare a class named PatientData that contains two attributes named height_inches and weight_pounds.

Answers

Answer 1

Answer:

class PatientData:

   def __init__(self, height_inches, weight_pounds):

      self.height_inches = height_inches

      self.weight_pounds = weight_pounds

a_patient = PatientData(75, 125)

print("Patient's height:", a_patient.height_inches)

print("Patient's weight:", a_patient.weight_pounds)

Explanation:

Create a class named PatientData

Inside the class, create a constructor (def __init__), that takes two parameters, height_inches and weight_pounds. This is used to initialize the PatientData objects. Inside the constructor, set the height_inches and weight_pounds

Create PatientData object named a_patient. Note that in order to create an object, you need to specify the height_inches and weight_pounds

Then, you may access these values by typing the object name, ".", and variable name. For example, to access the height_inches, you should write the following:

→ a_patient.height_inches

Then, print the height and weight of the patient


Related Questions

What is the benefit of encapsulation?

A. To rename variables
B. To reuse code
C. To make all members public
D. To make all members protected

Answers

Answer:

B. To reuse code

Write a JavaScript script that has subprograms nested three deep and in which each nested subprogram references variables defined in all of its enclosing subprograms.

Answers

Answer and Explanation:

Subprograms are nested three deep hence we would have three subprograms/functions under one program(function)

We call the program/function MotherFunction( using camel case variable naming rules)

function MotherFunction() {

var mother= 8;

console.log(mother);

function subDaughter1() {

var subDaughter1X = mother + 12;

console.log(subDaughter1X);

function subDaughter2() {

var subDaughter2X= mother + 5;

console.log(subDaughter2X);

function subDaughter3() {

var subDaughter3X= mother + 3;

console.log(subDaughter3X);

alert("sum="+subDaughter1X+subDaughter2X+subDaughter3X);

}

}

}

}

MotherFunction();

We created the first function and nested subfunctions under it, adding up the variable from the parent function(mother function) to its subfunctions and then alerting the total value of all the subfunction variables summed in the last/third subfunction. We then called the function after defining it.

Write a program that reads one or more strings from the standard input and outputs the count of vowels, consonants, and digit characters found in the stream.

Answers

Answer:

endinput = "no"

mylist = []

vowel = ['a', 'e', 'i', 'o', 'u']

vowelcount = 0

consonantcount = 0

digitcount = 0

string = " "

number = [ str(i) for i in range(0, 10)]

while endinput == "no":

   inputs = input("Enter string value: ")

   mylist.append(inputs)

   endinput = input("Do you want to end input? ( enter no to continue:  ")

for item in mylist:

   txt = item

   print(txt)

   for i in txt:

       if i == string:

           continue

       elif i in vowel:

           vowelcount +=1

       elif i in number:

           digitcount += 1

       else:

           consonantcount += 1  

print("Vowels: ", vowelcount)

print("Digits: ", digitcount)

print("Consonant: ", consonantcount)

Explanation:

The python program receives one or more strings from the standard input and appends it to a list. The algorithm iterates through the list of string values and counts the number of vowels, consonants, and digits.

what are the components of internet for class 5th​

Answers

Answer:

world wide web

Explanation:

they provide discussion forum like this of brainly which people ask questions which others can respond to

WILL BRAINLIEST Use the drop-down menu to correctly complete these sentences about the five standard Python data types.


are numeric values in Python data types.
A
is a large and changeable list that can contain any number of Python objects.

are connected sets of characters separated by quotation marks " ".

are sets of data separated by a comma between two parenthesis ( ).

are sets of data separated by a comma between two brackets [ ].

Answers

numbers,dictionary,strings,tuples and lists. in order

Answer:

numbers,dictionary,strings,tuples and lists. in order

Explanation:

When the body of a function is implemented temporarily with just a printf call that displays a message reporting that the function was entered, the programmer is using __________.

Answers

Answer:

The answer is "a stub".

Explanation:

A stub seems to be the feature only with expected signatures, that is a name and agreed arguments, however, the execution is incomplete. This function is used as a set, which allows the code to be evaluated before another method call is fully written. This method used in the development of software is a type of hardware, which is used to support certain programming functions.

Write the definition of a class Phone containing: 1. A data member named model of type string. 2. A data member named partNumber of type string. 3. A data member named retailPrice of type double 4. A void method to display the fields model, partNumber, and retailPrice on the standard output.

Answers

Answer:

class Phone(object):

   def __init__(self, model, partNumber, retailPrice):

       self.model = model

       self.part_number = partNumber

       self.retail_price = retailPrice

   def phone_specs(self):

       print( "Phone model: {}\nPart number: {}\nRetail price: {}".format( self.model, self.part_number, self.retail_price))

phone1 = Phone("Nokia", "asd234", 200.0)

phone1.phone_specs()

Explanation:

A class is a blueprint of a data structure used to create objects of the same data types and methods. The Phone class is an object that creates an instance of the phone1 object. The phone_specs method is used to display the details of the phone1 object.

What is an example of an absolute cell reference? 52% D2 $B$5 !90!

Answers

Answer:

$B$5 is an example of absolute cell reference

Explanation:

There are two types of referencing in MS Excel.

1. Relative

2. Absolute

Relative cell referencing changes according to the corresponding new cells when it is copied in other cells. MS Excel uses relative cell referencing by default.

Absolute cell referencing uses dollar sign with the row number and column name. When any formula with absolute referencing is copied, the cell addresses used remain the same.

From the given choices in question,

$B$5 is an example of absolute cell reference

An example of an absolute cell reference is "$B$5".

Thus, option (C) is correct.

Cell references can be either relative or absolute.

A relative cell reference changes when it is copied to another cell.

For example, if you have a formula in cell C2 that references cell A2 as "=A2+1", and you copy this formula to cell C3, it will automatically adjust to "=A3+1".

An absolute cell reference remains constant, regardless of where it is copied. When a cell reference is made absolute, the dollar sign ($) is used to indicate this.

For example, if you have a formula in cell C2 that references cell B5 as "=B$5+1", and you copy this formula to cell D3, it will still refer to cell B5 as "=B$5+1". The row and column references remain fixed.

Therefore, "$B$5" is an absolute cell reference.

Thus, option (C) is correct.

Learn more about Cell Reference here:

https://brainly.com/question/30714866

#SPJ6

There are thousands of downloadable digital images online that you can use in your presentations. {TRUE or FALSE}
this is for speech

Answers

True hopes this helps!

It should be noted that thousands of downloadable digital images are online for ones presentations.

This statement is true because, digital image serves as picture that is stored on a computer.

It can be been digitized, that is converted into a sequence of numbers that computers can understand and its available online.

Learn more about digital images at;

https://brainly.com/question/24448358

4.5 Lesson Practice edhesive

Answers

Answer:

Count Variable -- When it hits a limt.

using user input -- its true if the user input is the conditional variable needed to end it.

The two ways that one can end a loop are:

Using user input (Option B)- This is used when its true if the user input is the conditional variable  has to to terminate it;Count Variable (Option D) - When it hits a limit.

What is a loop?

In programming, the sequence of events (instruction) that continues to run repeatedly in the same chain is called a loop.

Thus, it is right to state that the two ways that one can end a loop are:

Using user input (Option B)- This is used when its true if the user input is the conditional variable  has to to terminate it;Count Variable (Option D) - When it hits a limit.

Learn more about loops at:
https://brainly.com/question/24052822
#SPJ9

list the steps to create a new folder in windows

Answers

Navigate to where you want to create the new folder, and click New Folder. Type the name of your folder, and press Enter. To save a document to the new folder, open the document, and click File > Save As, and then browse to the new folder, and click Save.

salvado has a flash disk of 1.5GB and wants to store more music files of 950KBs each . How many files will he be able to store on his flash disk?​

Answers

Answer:

Convert 1.5GB to KBs = 1500000kb

1500000kb/950kb ≈ 1579

Explanation:

A flash disk is a storage device. It has enough memory to store large files. In the given question, the flash disk has a memory of 1.5GB and can store 1578.94 music files of 950KBs each.

What is flash disk?

A flash disk is a data storage device that uses flash memory specifically : a small rectangular device which is designed to be plugged directly into a USB port on a computer. It is often used for transferring files from one computer to another computer system.

Flash disks have no mechanical platters or access arms. It is termed "disk" because of the data which are accessed as if they were on a hard drive. The disk storage structure is emulated.

In the given question, the flash disk contains 1.5GB memory and has to store music files of 950KBs each. For determining the number of music files which can be stored in the flash disks, we have to first convert the unit of flash disk from GB to KB:

1GB = 1,000,000 KB

1.5 GB = 1,500,000 KB

size of music file = 950 KB

Number of music files that can be stored = storage in the flash disk ÷ size of the music file

Number of music files = 1500000KB ÷ 950KB

Number of music files = 1578.94

Learn more about Flash disk here:

https://brainly.com/question/1130880

#SPJ2

Are dogs are dangerous. the golden retriever is a dog. there for the golden retriever is dangerous. is this argument sound or unsound?

Answers

The argument is unsound.

This is science I just couldn’t find it

Answers

Answer:

69

Explanation:

It is 69 because it is the most for that degree.

Let f(w) = 2w^3 - 5. Let z = 2. What is f(z)?​

Answers

Answer:

Hence f(z)=11

*This is what i think*

The coding system that has just two characters is called:

a
binary
b
dual.
c
basic.
d
double.

Answers

Answer:

A. Binary

Definition:

Pertaining to a number system that has just two unique digits 0 and 1. - binary code

Answer:

a binary

Explanation:

ascii. an agreed method for paring the alpanumeric characther set with binary repersenations used in computers. binary. Pertaining to a number system that has just two unique digits 0 and 1. binary code.

Given a binary search tree containing N integers, create an AVL tree containing the same values. You should not destroy the original BST in the process. What is the worst case time?

Answers

Answer:

answer : 0 (n log n )

Explanation:

Creating an AVL tree containing the same values and containing N integers and without destroying the original BST in the process, the worst case time will be : 0 ( n log n ) and this is because each insertion will take 0 (log n ) time

The worst case time for a binary search algorithm that contain N integers without destroying the original binary search tree (BST) is [tex]0(NlogN)[/tex]

What is a binary search?

Binary search can be defined as an efficient algorithm that is designed and developed for searching an element from a sorted list of data, especially by using the run-time complexity of [tex]0(logN)[/tex].

Note: N is the total number of elements contained in a list.

In this scenario, the worst case time for this binary search algorithm that contain N integers without destroying the original binary search tree (BST) is given by [tex]0(NlogN)[/tex]

Read more on binary search here: https://brainly.com/question/24268720

How did DDE devices have made our daily life easier?

Answers

Answer:

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

Explanation:

DDE (direct data entry) devices are the devices that read data from a source and transfer it directly into the computer. Unlike, other input devices which require physical interaction which requires you to move physically or to do something for an output or feeding data into a computer.  

The DDE devices require no hard work while taking input into the computer as compared to other input devices. These DDE devices made our life very easy. Because these devices take input accurately and there are no chances of human error.

The example of DDE devices are magnetic stripe reader, chip reader, Pin pads, optical mark reader, and barcode reader, etc.

These devices have brought great advantages to human life. Because by using these data entry devices, information can be put into very quickly, more accurate than typing and information of the whole page transferred .very quickly and accurately into the system. These devices are also more secure and can hold lots of data, and the data is protected with the PIN (personal identification number). These are also used in ATM machines, handheld, and entry doors.

Answer:

wait is it a write in answer or a multiple choice?

Explanation:

Select the correct answer.
Sandra has composed a draft of her essay in Microsoft Word. She now wants to revise the essay. Which tool can she use to store the document with a different name and makes changes in the new document?

A.
Share
B.
Download
C.
Make a copy
D.
Save As

Answers

Answer:

I think make a copy maybe

Explanation:

Answer:

D

Explanation:

She can save and store the doc, change the name when saving, and make changes to revise once saved.

answer the 1 question for 10 points plz dont get it wrong. HAVE A GREAT DAY

Answers

Answer:

3rd one

Explanation:

Assume a file containing a series of integers is named numbers.txt and exists on the computer’s disk. Write a program that calculates the average of all the numbers stored in the file.

Answers

Answer:

Explanation:

The following code is written in Java. It assumes that the numbers.txt file is in the same folder as the Java file and the numbers are separated one on each line. It reads the file, adds all the numbers to an array, then adds the numbers into a single variable and finally divides by the total amount of numbers in order to get the average.

public static void main(String[] args) {

       ArrayList<Integer> numbers = new ArrayList();

       try {

           File myObj = new File("numbers.txt");

           Scanner myReader = new Scanner(myObj);

           while (myReader.hasNextLine()) {

               String data = myReader.nextLine();

               numbers.add(Integer.parseInt(data));

           }

           myReader.close();

       } catch (FileNotFoundException e) {

           System.out.println("An error occurred.");

           e.printStackTrace();

       }

       int average = 0;

       for (int x:numbers) {

           average += x;

       }

       average = average / numbers.size();

       System.out.println(average);

   }

Write an if-else statement for the following:
If user_tickets is less than 5, assign 1 to num_tickets. Else, assign user_tickets to num_tickets.

Answers

In python 3.8:

if user_tickets < 5:

   num_tickets = 1

else:

   num_tickets = user_tickets

For this code to work properly, you'll have to first declare user_tickets before the if-else statements.

Bibliography
There are some formatting errors in this bibliography
page. Which corrections should be made? Check all
that apply
O The title should be in bold.
O There should be a double space between each
citation
Amber, Claire. "How Would Gandhi Respond?"
The World Post. TheHuffington Post.com,
16 Sept. 2011. Web. 28 Feb. 2014.
Wilkinson, Philip. Gandhi: The Young Protester
Who Founded a Nation. Washington, DC:
National Geographic Society, 2005. Print.
Eknath, Easwaran. Gandhi the Man: How One
Man Changed Himself to Change the World.
Tomales, CA: Nilgiri, 2011. Print.
O The citation entries should be in alphabetical order.
The web sources should be listed first.
The second and third lines of the last entry should
be indented

Answers

Answer:

There should be a double space between each citation

The citation entries should be in alphabetical order.

The second and third lines of the last entry should be indented

Explanation:

The bibliography page contains some formatting errors which should be corrected before it is standard and acceptable.

First of all, in MLA (and most other styles), it is important to double space each citation to make them easily readable and eliminate errors.

Next, the citation entries needs to be in alphabetical order and not random which makes it easy to find a source.

Also, there needs to be indentation in the second and third lines of the last entry.

Answer:

B,C,E is the answer

Explanation:

I got it right on test...

sorry if its too late

Hope it helps someone else :D

Which Packet Tracer feature do you think will be most helpful for you in learning how to manage a network

Answers

Answer:

Its ability to sniff and analyze packets in a network.

Explanation:

Network administrators require advanced skills and tools to manage a large network, to analyze packets as they are transmitted across the network.

Packet tracer helps to monitor the network connection and packet transfer. It informs the administrator of a dropped connection, slow transmission due to a bottle-neck, and many more packet related issues

Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.

Answers

Answer:

Explanation:

public class RecursiveCalls {

public static void backwardsAlphabet(char currLetter) {

if (currLetter == 'a') {

System.out.println(currLetter);

}

else {

System.out.print(currLetter + " ");

backwardsAlphabet(--currLetter);

}

return;

}

public static void main (String [] args) {

char startingLetter = '-';

startingLetter = 'z';

// Your solution goes here

backwardsAlphabet(startingLetter);

return;

}

}

Write an expression that will print "in high school" if the value of user_grade is between 9 and 12 (inclusive).

Answers

Answer:

C#

if(user_grade >=9 && user_grade <=12)

{

   Console.WriteLine("In Highschool");

}

Python

if user_grade >= 9 & user_grade <= 12:

  print("In Highschool")

Java

if(user_grade >=9 && user_grade <=12)

{

   System.println("In Highschool");

}

Explanation:

explain mechanical computer ,electromechanical and electronic computer with example

Answers

Answer:

A mechanical computer uses moving parts to do it’s calculations. Think old style adding machines.Electronic computers use electronic oscillators to generate a clock. The oscillator might include a mechanical element such as a crystal, but the majority of the clock signal is processed in the electrical domain.

Explanation:

An example of a mechanical computer clock is a Swiss watch movement, which needs no electronics. Movement is based upon springs coupled to other mechanical pieces. Swiss watches are high precision mechanical computers that do counting. There are other types of more sophisticated mechanical computers. Research the works of Konrad Zuse and his Z1 mechanical computer.

Based on the data definition classes identified below, assume you wish to create a Dictionary class that inherits from the Book class. In addition to title and cost, the Dictionary class must also store the number of words present in the dictionary. Write the code that will create a constructor in the dictionary class that passes in and sets the dictionary's title, cost, and number of words.

public class Book {
private String title;
private double cost;

public Book(String title) {
this(title, 0.00);
}

public Book(String title, double cost) {
this.title = title;
this.cost = cost;
}

public String getTitle() { return this.title; }
public double getCost() { return this.cost; }
}

public class Dictionary extends Book {
private double numWords;

// Create Contructor

}

Answers

Answer:

//==============================

// Book class

//==============================

public class Book {

private String title;

private double cost;

public Book(String title) {

 this(title, 0.00);

}

public Book(String title, double cost) {

 this.title = title;

 this.cost = cost;

}

public String getTitle() {  

 return this.title;  

}

public double getCost() {  

 return this.cost;  

}

}

//==============================

// Dictionary class

//==============================

public class Dictionary extends Book {

private double numWords;

// Create Contructor

public Dictionary(String title, double cost, double numWords){

 super(title, cost);

 this.numWords = numWords;

}

}

Explanation:

The actual response to this question is shown in bold face in the above.

Line 1:

public Dictionary(String title, double cost, double numWords){

Here the header for the constructor for the Dictionary class is written which takes in three parameters - title, cost and numWords. These parameters will be used to set the values of the instance variables of the Dictionary class.

Remember that the Dictionary class extends from the Book class. Therefore, in addition to its numWords attribute, the Dictionary class also has the title and cost attributes.

Line 2:

super(title, cost)

Here, since the Dictionary class inherits from the Book class, it can also call the constructor of Book class to initialize two of its three variables which are title and cost. Hence the need for the super() method keyword. In other words, the super() in the Dictionary class is the constructor from the parent class and it is used here to set the dictionary's title and cost attributes.

Line 3:

this.numWords = numWords;

Here, the only attribute left to be set is the numWords. Therefore, the 3rd line sets this attribute to the parameter passed into the constructor in line 1.

Line 4:

}

Here, the block containing the Dictionary class constructor is being closed.

How long will it take to transfer 1GB data on USB 2.0, on USB 3.0

Answers

Answer:

Have a great day, Here is the answer to your question:

It will take around 18 seconds

Explanation:

So in principle 1GB of data to be uploaded running at peak speed is suggested to take around 18 seconds but in fact, DCD test results show USB 2.0 takes 3 minutes 18 seconds to complete a 1GB switch. Whereas USB 3.0 can accommodate up to 5gbps of data transferred-more than 10 times faster than its predecessor.

what is a device driver​

Answers

Answer:

Explanation:

In computing, a device driver is a computer program that operates or controls a particular type of device that is attached to a computer. ...

Answer:

a device driver is a computer program that operates or controls a particular type of device that is attached to a computer.[1] A driver provides a software interface to hardware devices, enabling operating systems and other computer programs to access hardware functions without needing to know precise details about the hardware being used.

Explanation:

Other Questions
Write an equation in point-slope form of the line that passes through the point (2,1) and has a slope of 2 On which tab are the print commands in Excel 2016 accessed?HomeFile (Backstage)ViewEdit Answe this pls smart people need help Does anybody know these questions ? Select the correct text in the passage.Read The Railway Train by Emily Dickinson. Which line best reflects the trains playful nature?I like to see it lap the miles,And lick the valleys up,And stop to feed itself at tanks;A.)And then, prodigious, stepAround a pile of mountains,B.)And, supercilious, peerIn shanties by the sides of roads;And then a quarry pareTo fit its sides, and crawl between,Complaining all the whileIn horrid, hooting stanza;C.)Then chase itself down hillAnd neigh like Boanerges;Then, punctual as a star,D.)Stopdocile and omnipotentAt its own stable door. what is a number that has the same value as 12.9 which fraction is larger 2/3 or 3/4 and find the common denominator You work 4 hours on Monday, 4.5 hours on Tuesday, 7.25 hours on Thursday, and 12 hours on Saturday. If you get paid $11.52 per hour, what is your total pay for the week? pleaseee! Check attachment We now (know, knows) that Galileo, with his improved telescope, first confirmed that the light source was the stars. 1/2 divided by 3 = blank/2 x 1/2 thicker,less detailed and embossed appearance 6 + p Look at the map above, what does the legend show? As part of the lively festivities to honor the patron saints of Puerto Rican towns, monsters (vejigantes) who wear bells and elaborate papier-mch masks with multiple horns roam the streets threatening to hit people on the head with: A total of 625 tickets were sold for the school play. They were either adult tickets or student tickets. There were 75 fewer student tickets sold than adult tickets. How many adult tickets were sold? Which of these lists shows the elements or parts of a plot?events, resolution, problemproblem/conflict, characters, actionevents, suspense, charactersproblem/conflict, events, resolution guys please help/ no answers from google!it's for tomorrow 6,857 my lessons my stuf The Pythagorean Theorem What is the distance between the points (22,21) and (26,24)? movie The Founder1. What is this movie about? summarize the story of the movie in a short paragraph.