Create a program that takes in the following from user input: User full name, ge
ID: 3717748 • Letter: C
Question
Create a program that takes in the following from user input: User full name, gender, location, number of days and number of children. The program should then print out an invoice with all these details including the total cost of having a vacation at Namutoni Lodge, calculated as:
per couple
(number of days X 1685) + 7.5% Tax
per child (below 16)
(number of days X 765) + 7.5% Tax
(NB: Single adults pay the same amount as couples since Namutoni Lodge does not have rooms for singles)
Sample run 1:
Enter full name: John Masango
Enter number of children: 2
Enter location: Shandubala
Enter number of days booked: 2
Output: Good day John Masango, your invoice is a follows:
Home address: Shandubala
Your number of children is: 2
You are staying with us for 2 days
Your total cost will be N$5267.50
per couple
(number of days X 1685) + 7.5% Tax
per child (below 16)
(number of days X 765) + 7.5% Tax
Explanation / Answer
Please find my code.
Output:
Enter Full Name: Pravesh
Enter Gender(M/F): M
Enter Location: Bangalore
Enter number of children: 2
Enter hours worked: 45
Good Day Pravesh,Yours details are as follow:
Gender: M
Number of children: 2
Home Address: Bangalore
Hours Worked: 45.0
Salary for hours worked: US $4370.62
Process finished with exit code 0
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.