Generate a Bill receipt using Python

 





 Code for The receipt generator: 

rate=0
while True:
    try:
        amount=input("Enter the rate ")
        if amount=="q":
            with open("Bill.txt","a"as files:
                files.write(f"Bill:{rate}\n")
                break
        else:
            rate=rate+int(amount)
    except:
        print("Please enter a valid input")










Comments

Post a Comment

Popular posts from this blog

Automate your file manager using Python

Train ticket booking project using Python