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.

Expert's answer

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)
LATEST TUTORIALS
APPROVED BY CLIENTS