You are on page 1of 10

ASSIGNMENT 1

1) a = float(input("Enter the first number: "))
b = float(input("Enter the second number: "))
c = float(input("Enter the third number: "))
avg = (a + b + c) / 3
print("The average is", avg)
2) grossincome = float(input("Enter the gross income: "))
numdependents = int(input("Enter the number of dependents: "))
STANDARD_DEDUCTION= 10000
DEPENDENT_DEDUCTION= 3000
TAX_RATE= 20/100
taxableincome = grossincome - STANDARD_DEDUCTION -DEPENDENT_DEDUCTION * numdependents
incometax = taxableincome * TAX_RATE
print("The income tax is $" , (incometax))
3) seconds = int(input(" enter a number of seconds"))
minutes = seconds // 60
remaining_seconds = seconds % 60
print ( f" {seconds} seconds is {minutes} minutes and {remaining_seconds} seconds ")
4) a = 25
b = '25’
c = 25
a = int(a)
b = int(c)
result = a + b + c
result_str = str(result)
print(result_str)
5) import math
for angle in range(0, 346, 15):
 radians = math.radians(angle)
sin = round(math.sin(radians), 4)
cos = round(math.cos(radians), 4)
print(angle , '---', sin, cos)

You might also like