2.3P Hospital charges.docx - require\/input_functions def read_patient_name patient_name = read_string\"What is your name return patient_name end def

2.3P Hospital charges.docx - require/input_functions def...

This preview shows page 1 out of 1 page.

require './input_functions' def read_patient_name() patient_name = read_string("What is your name? ") return patient_name end def calculate_accommodation_charges() charge = read_float("Enter the accommodation charges: ") return charge end def calculate_theatre_charges() charge = read_float("Enter the theatre charges: ") return charge end def calculate_pathology_charges() charge = read_float("Enter the pathology charges: ") return charge end def print_patient_bill(patient_name, total) puts ("The patient's name is: " + patient_name)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture