-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProgram Q16-Program to generate a bill.py
More file actions
26 lines (25 loc) · 1.24 KB
/
Program Q16-Program to generate a bill.py
File metadata and controls
26 lines (25 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 08:49:37 2020
@author: ak792
"""
# WAP to prepare a grocery bill. For that enter the name of the items purchased
# , quantity in which it is purchased, and it's price per unit. Then display
# the bill in following format.
# ************************************BILL************************************
# Item Name Item Quantity Item Price
#
# ****************************************************************************
# Total Amount To Be Paid
# ****************************************************************************
print("Program to generate a bill.\n\n\n")
item_name = str(input("Enter item name : "))
quantity = int(input("Enter quantity of item : "))
price = float(input("Enter price per unit : "))
print("\n****************************BILL****************************")
print("Item Name Item Quantity Item Price")
print(item_name, " " , quantity , " " , price)
print("************************************************************")
print("Total amount to be paid " + str(quantity*price))
print("************************************************************")
input()