Answer to Question #187591 in Python for bibi maryam

Question #187591
Write a python script that get Room No, Room Rent per day, Number of days stayed in and extra charges (breakfast, lunch, and dinner) and display total bill to customer.
1
Expert's answer
2021-04-30T16:51:49-0400
def totalBill(roomNo,rent_per_day, no_of_days, extras ):
    total =(rent_per_day*no_of_days)+extras
    return total

if __name__ == '__main__':
    rn=int(input("Enter room number: "))
    rd=int(input("Enter rent per day: "))
    nd=int(input("Enter the number of days spent: "))
    ex=int(input("Enter amount spent on other expenses, extras: "))

    totalAmount=totalBill(rn,rd,nd,ex)

    print("The total bill is:", totalAmount)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS