Professional Documents
Culture Documents
Python Assignemnt 1
Python Assignemnt 1
Assignments:
Practice Set:
1. A cashier has currency notes of denomination 1, 5 and 10. Write python script to accept the
amount to be withdrawn from the user and print the total number of currency notes of each
denomination the cashier will have to give.
def notes_counter(amount):
notes_10 = total_amt // 10
amount %= 10 # Get the reminder for further calculations
notes_5 = amount // 5
amount %= 5
OUTPUT :
2. Write a python script to accepts annual basic salary of an employee and calculates and displays
the Income tax as per the following rules.
def calculate_tax(salary):
tax = 0
tax = salary // 10
else:
tax = salary // 20
return tax
tax_amount = calculate_tax(basic_salary)
3. Write python script to accept the x and y coordinate of a point and find the quadrant in which the
point lies.
4. Write a python script to accept the cost price and selling price from the keyboard. Find out if the
seller has made a profit or loss and display how much profit or loss has been made.