Questions
''' File: pyPatientLL.py Author: JD ''' class Node: #ADT        def __init__(self, p = None):             ...

'''

File: pyPatientLL.py

Author: JD

'''

class Node: #ADT

       def __init__(self, p = None):

             self.name = ""

             self.ss = self.age = int(0)

             self.smoker = self.HBP = self.HFD = self.points = int(0)

             self.link = None

             #if list not empty

             if p != None:

                    p.link = self

      

ptrFront = ptrEnd = None

choice = int(0)

def menu():

       print( "\n\tLL Health Clinic\n\n")

       print( "1. New patient\n")

       print( "2. View patient by SS#\n")

       print( "3. Update patient's record\n")

       print( "4. Quit the App\n\n")

       print( "Enter your choice: ")

def getChoice():

       choice = int(input(""))

       # Validate the menu selection

       while ((choice < 1) or (choice > 4)):

             print( "Please enter 1, 2, 3, or 4: ")

             choice = int(input(""))

       return choice

def getInfo(ptr):                            #Populate the record

       ptr.name = input("Enter patient's name: ")

       ptr.age = int(input("Enter age: "))

       ptr.ss = int (input("Enter patient's SS: "))

       habits = input("Enter habits 1/0: smoker, HBP, HFD:").split()

       ptr.smoker, ptr.HBP, ptr.HFD = map(int, habits)

       calPoints(ptr)

# implement flowchart here

def calPoints(ptr):

       pass

def searchBySS(ptr, ssKey):     #search by SS

       pass

def dispPatient(ptr):                  #disp record

       pass

def updatepatinet(ptr):                #update any habits (smoking, HBP, HFD)

       pass                                                #recalculate points

def processChoice(choice):

       ptr = None

       global ptrEnd

       global ptrFront

       # Procee based on user input

      

       if choice == 1:    #New patinet

             if (ptrEnd == None):

                    ptrEnd = ptrFront = Node(ptrEnd)

             else:

                    ptrEnd = Node(ptrEnd)

                   

             getInfo(ptrEnd)    #Populate the record

       elif choice == 2: #case 2 find patient

             key = int(input("Enter SS: "))

             if (ptr == searchBySS(ptrFront, key)):

                        dispPatient(ptr)

             else:

                          print ("\nRecord not found\n\n")

       elif choice == 3:         #case 3 update patient

             key = int(input("Enter SS: "))

             if (ptr == searchBySS(ptrFront, key)):

                          updatepatinet(ptr)

             else:

                          cout<<"\nRecord not found\n\n";

      

def main():

       do = bool(True)

       while(do == True):

             menu()

             choice = getChoice()

             if choice == 4:

                    do = False

             else:

                    processChoice(choice)

#call main

main()

KEEP THE PYTHON CODE AS IT IS and try the python singly linked list code first and ask questions.

Secondly implement the functions having just "pass" one at a time and fully test and move on to next function.

"calPoints function" is implemented based on the flowchart you will find in the announcement section.

In: Computer Science

.Read the quote and discuss what you think the author means by ‘passively calculating standard ratios’....

.Read the quote and discuss what you think the author means by ‘passively calculating standard ratios’.

Corporations have substantial incentives to exploit the fact that accounting principles are neither fixed for all time nor so precise as to be open to only a single interpretation. Analysts, who appreciate the magnitude of the economic stakes, as well as the latitude available under the accounting rules, will see clearly that a verdict derived by passively calculating standard ratios may prove dangerously naive.

Source: Fridson, M & Fernando, A 2002, Financial statement analysis: a practitioner’s guide, 3rd edn, John Wiley & Sons, New York

In: Accounting

In the required reading article for this module, Zero-Based Budgeting, the author, J. Stephen McNally, renders...

In the required reading article for this module, Zero-Based Budgeting, the author, J. Stephen McNally, renders both positive and negative support for why a company might want to implement the concept over a traditional budgeting process. It can be a radical change for a company used to doing things "same as last year." If you were in charge of the budgeting process for a company, would you implement zero-based budgeting for a year to try out the concept? What things about the corporate environment did you take into consideration when making that decision?

In: Accounting

In the required reading article for this module, Zero-Based Budgeting, the author, J. Stephen McNally, renders...

In the required reading article for this module, Zero-Based Budgeting, the author, J. Stephen McNally, renders both positive and negative support for why a company might want to implement the concept over a traditional budgeting process. It can be a radical change for a company used to doing things "same as last year." If you were in charge of the budgeting process for a company, would you implement zero-based budgeting for a year to try out the concept? What things about the corporate environment did you take into consideration when making that decision?

In: Accounting

PROMPT:  The author offers what he claims to be a simple proposal on how regulators should think...

PROMPT:  The author offers what he claims to be a simple proposal on how regulators should think about concentrated industries: “…when members of a concentrated industry act in parallel, their conduct should be treated like that of a hypothetical monopoly.”


Explain why you believe that members of a concentrated industry should or should not be considered similar to a monopoly.

Comment on whether there is in fact a problem that needs to be resolved if firms in the same industry happen to independently reach the same decision regarding product characteristics and price.

In: Economics

In Mary Pardo’s “Grassroots Activism: Mothers of East Los Angeles” the author links the social networks...

In Mary Pardo’s “Grassroots Activism: Mothers of East Los Angeles” the author links the social networks of women and their _______-based responsibilities to political resources.

Gender

ethnic

age

education

You are reading the alumni newsletter from Elite University (a very prestigious institution). In the newsletter it is mentioned that children of “generous” alumni (i.e., those who contribute large amounts of money) are guaranteed admission to the institution, regardless of their grades. Interestingly, you note from the pictures of generous alums that they are all white. You conclude that this suggests a case of

stereotyping

prejudicial treatment

individual discrimination

institutional discrimination

good financial management

Taylorization, which McDonald’s is based upon, is solely for the purpose of efficiency. It has nothing to do with management exercising control over workers.

True

False

In Thompson’s “Hanging Tongues: A Sociological Encounter with the Assembly Line,” the author spent time working on the kill floor and discovered all but what?

that working faster than the line speed allowed the workers a form of symbolic control

working conditions were humane for the workers

the better pay compared to other options tended to become a financial trap for those who had originally intended to move on

that buying various gadgets/toys gave workers some compensation for the bad working conditions

getting sick and/or injured was very common but workers tended to cope by concluding that someone who got seriously hurt or killed must have been sloppy

In: Psychology

Your textbook’s author speaks to the use of rich media ads. Which of those mentioned do...

  1. Your textbook’s author speaks to the use of rich media ads. Which of those mentioned do you feel is the most important when developing an Integrated Marketing Communications (IMC) strategy? Why?
    • In addition, as you are crafting an IMC strategy, include the two most important traditional (old) media tools that might also be utilized. Why?
  2. What issues are likely to affect the future of mobile advertising? Explain.

In: Economics

An uncharged capacitor is connected to the terminals of a 4.0 V battery, and 12 micro C flows to the positive plate.

An uncharged capacitor is connected to the terminals of a 4.0 V battery, and 12 micro C flows to the positive plate. The 4.0 V battery is then disconnected and replaced with a 5.0 V battery, with the positive and negative terminals connected in the same manner as before. How much additional charge flows to the positive plate?

In: Physics

Create a State-Space Representation of following coupled second order differential equation? Define state vector as X...

  1. Create a State-Space Representation of following coupled second order differential equation? Define state vector as X =[x,x',a,a']^T. Control input as u= V. And output as y = [x,a]

-0.85306x ''+ 0.08391a ''- 21.149x '- 0.444a' = V

0.399483x'' – 0.10241a'' - 21.149x'' – 0.444a' + 3.91892a= V

In: Electrical Engineering

ART What are some of the roles of photographers shown below and the functions that photography...

ART

What are some of the roles of photographers shown below and the functions that photography serves in the world?

* John Humbles (https://www.youtube.com/watch?v=6d97X9sE4MQ)

* Vik Muniz (https://www.youtube.com/watch?v=dTDNlD6yMxo)

*Ansel Adams (https://www.youtube.com/watch?time_continue=80&v=n-ZCEXWdIMg)

In: Psychology