'''
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’.
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 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 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 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 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
|
In: Psychology
In: Economics
1. Assume that you are conducting an experiment in human performance. You have two groups: experimental (the group that receives the treatment) and control (the group that does not receive the treatment). Briefly describe your experiment, your research hypothesis, and your null hypothesis.
2. Assume that you are conducting an experiment in human performance. You have two groups: experimental (the group that receives the treatment) and control (the group that does not receive the treatment). What steps would you take to make a decision about the effectiveness of your experimental intervention?
In: Statistics and Probability
Hi there,
I want to make an experiment that you can use a one sample z- test and interval on it. The project is a paper helicopter and we can make as many we like and then explain the process It should be dropped from a height and a weight like paperclip in the bottom to make fall. Please help me with this project.
1st: what is inference procedure and the variables you are
estimating
2nd: the experiment procedure, the condition and how we can prevent bias
3rd. what kind of difficulties I could have on making such an experiment.
In: Statistics and Probability
We want to determine spesifications of very toxic fuel especially the particle diameters. After some studying we claim that the particle diameter is dp, exit speed is U, the liquid viscosity is u, surface tension is Y, density is p, the diameter of spraying injector exit is D. For a secure experiment we need to work with water. Design an experiment with water and determine the required conditions. Finally, for toxic fuel use the results of experiment for determining spesifications (especially the partical diameter) with mathematical expressions use dimensionless numbers if needed.
In: Mechanical Engineering