Compute and display the charges for a patients hospital stay

Assignment Help Python Programming
Reference no: EM132356470

Question

Please program these in python 3 please,

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: EM132356470

Questions Cloud

Explanation of systematic risk-potential return associated : Discuss diversification strategies for your portfolio. Brief explanation of the systematic risk and potential return associated with that particular investment.
Discuss the process of working memory : Our working memory is a significant component to learning new information. Working memory is complex as it encompasses many areas of the brain.
Define a word as ending a sentence : Define a word as ending a sentence if that word is immediately followed by a period. A startwords function that takes a single string argument.
Discuss the domestic terrorist event : Discuss the domestic terrorist event. Provide information about the critical infrastructure that was impacted and how the role of protecting this infrastructure
Compute and display 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
Display the average score accurate to three decimal places : Write program that can be used to determine the average of a number of percent tests. Display the average score accurate to three decimal places.
Explain the difference between nominal and ordinal data : Big Data is everywhere and various businesses around the world are driven by Big Data. However, while some businesses rely on Big Data for organizational.
Calculate the average weights of people : Calculate the average weights of people whose names begin with the letter specified in the config parameter. Write the definition of the function avg_weight.
Define characteristics of a basic ell level and accounts : Include a 500-750-word summary below the chart (within the same document) that contains rationales for each of the three domains that describes.

Reviews

Write a Review

Python Programming Questions & Answers

  Function should return a dictionary

Write a function numOccur(s), where s is a string; the function should return a dictionary whose keys are the 26 ascii letters abcdefghijklmnopqrstuvwxyz

  Write a program that uses a bar

Write a program that uses a bar chart to display the percent-ages of the overall grade represented by the project, quizzes the midterm exam and the final exam

  1 why is biodiversity importantnbsp discuss the ways in

1 why is biodiversity important?nbsp discuss the ways in which the value may be assigned to biodiversity. based on your

  Write a program that multiplies two hard-coded numbers

Write a program that multiplies two hard-coded numbers, then prints the individual numbers out and prints thier product out, all on separate lines.

  Design a function that accepts an array

Design a function that accepts an array and the array's size as arguments, and returns the largest value in the array. The method should use recursion.

  Explain a python program storing and processing simple bank

A Python program storing and processing simple bank records is in the early stages of development. The records are stored in a text file (bank.txt) that contains, for each bank customer, their given name, account number and balance.

  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

  Print the result of their addition and subtraction

You are given two complex numbers. You will print the result of their addition, subtraction, multiplication, division, and modulus operations.

  What are key constructs required to create loops in python

What are the key constructs required to create loops in Python? Identify two scenarios that may require two different types of loops.

  Recursion to write a python function

Use recursion to write a Python function depth(LL), where LL is a nested list of lists of lists etc. of numbers (i.e., oat and int) and strings. We want to return the depth of nesting, i.e., how often, maximally, there is a list in a list etc

  Create your own function that illustrates a feature

Create your own function that illustrates a feature that you learned in this unit. The function must take at least one argument.

  Turn the turtle image into a .gif picture

How can you turn the turtle image into a .gif picture when using the built-in turtle for Python? If that's impossible how do you remove the line when you move the turtle around?

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