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")
Nice
ReplyDeleteThanks any suggestions to improve
Delete