Displays the charges for a patients hospital stay

Assignment Help Python Programming
Reference no: EM131145226

Python

Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask patient name and if the patient was admitted as an in-patient or an out-patient.

If the patient was an in-patient the following data should be entered:

- The number of days spent in the hospital

- The daily rate

- Charges for hospital services (lab tests, etc.)

- Hospital medication charges.

If the patient was an out-patient the following data should be entered:

- Charges for hospital services (lab tests, etc.)

- Hospital medication charges. Use a single, separate function to validate that no input is less than zero.

If it is, it should be re-entered before being returned. Once the required data has been input and validated, the program should use two functions to calculate the total charges. One of the functions should accept arguments for the in-patient data, while the other function accepts arguments for out- patient data.

Both functions should return the total charges. Once this is verified and calculated, make a report by having the following information stored in a file. patient Name, In-patient or out-patient, Number of days spent in the hospital,etc Sample output into a file: Patient Name: Mike Navaro Inpatient or outpatient: In-patient Days spent in the hospital: 3 The daily rate : $1000 Charges for hospital services (lab tests, etc.): $2000 Hospital medication charges: $200 Total charges will be : $5200

Reference no: EM131145226

Questions Cloud

Relationship between diversity-media and communication : In your own words What do you think is the relationship between diversity, the media, and communication? How can these three interconnected areas enhance the workplace, in your opinion?
Complete the table indicating whether each item : Complete the table indicating whether each item (1) affects operating (O) activities, investing (I) activities, financing (F) activities, or is a noncash (NC) transaction reported in a separate schedule; and (2) represents a cash inflow or cash outfl..
How charity navigator got started : You have probably watched the video on how Charity Navigator got started, and here is a follow-on article detailing its inception Question Everything Please go back and select one of the five nonprofit's you listed in Topic 1.
Describe a transaction that would benefit all three citizens : If the cost of the fireworks display is divided equally among the citizens, will a majority vote be in favor of the display?
Displays the charges for a patients hospital stay : Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask patient name and if the patient was admitted as an in-patient or an out-patient.
Which type of the four leadership styles : little more info, the path-goal theory says that leaders behave in four ways. The Directive leader pretty much does what the title says. They direct their employees by showing them what is expected of them, guiding them through it and giving them wor..
Write an essay on corporate governance policy of nbad : Write an essay on Corporate Governance Policy of NBAD in approx 400 Words. Difference in methodology adoption of corporate governance.
Compute and interpret the machine’s cp : Consider a machine that fills soda bottles. The process has a mean of 15.9 ounces and a standard deviation of 0.06 ounces.  The specification limits are set between 15.8 and 16.2 ounces. a) Compute and interpret the machine’s Cp b) Compute and interp..
Design an incentive system to generate efficient questioning : In the absence of participation incentives, will a confused student ask a question when it would be socially efficient to do so?

Reviews

Write a Review

Python Programming Questions & Answers

  Asign true to the variable has_dups

Asign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise

  Write a modularized body mass index program

Write a modularized Body Mass Index (BMI) Program which will calculate the BMI of a team player. The formula to calculate the BMI is as follows: BMI = Weight *703 / Height^2.

  Calculate the area of a rectangle and displays it

Write a python program that calculates the area of a rectangle and displays it - Display the variables length, width and area on screen using the print function

  You will define an operation on positive integers called

you will define an operation on positive integers called twiddle which consists of summing the squares of the digits of

  Evaluate a user''s expression

Write a function that will evaluate a user's expression. It should call the getExpression function that you previously wrote to get the expression to evaluate from the user. You should evaluate the expression step-by-step.

  Project will be a simple, working program

This programming project will be a simple, working program, using Python language, which utilizes a good design process and includes:Sequential, selection, and repetitive programming statements as well as,At least one function call.

  Write a function rmduplic(l), where l is any list

Write a function rmDuplic(L), where L is any list. The function should return a list M that contains the same items as L, except that repetitions (duplicates) have been removed: only the first occurrence of each entry is kept (i.e., order is prese..

  How a vertical scroll bar is associated with a list box

What are instance variables, and what role does the name ‘self' play in the context of a class definition. Describe how a vertical scroll bar is associated with a list box.

  How catch market trends

How catch market trends? Crossing n1­days moving average (MA) and n2­days moving average (n1>n2). When n2­days MA crosses n1­days MA, it is an indicator for the start of upward trend, and the other way around for downward trend

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Create a ride share simulator assignment

Create a ride share simulator assignment. In this particular function, I am trying to create a list of the drivers in a Driver Class that are currently listed as idle. Since they are idle, I can then match them up with an awaiting rider. The assignme..

  Write an expression that concatenates the string

Write an expression that concatenates the String variable suffix onto the end of the String variable prefix .

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd