## Python Control statement lab

Note: Take input from User

0. Find the given number is even or odd.

1. Write a program to calculate gross salary.

DA=70% and HRA=10% if basic salary<15000.

DA=98% and HRA=500 if basic salary>=15000.

NO DA HRA if salary <10000

2. Write a program that inputs a pair of number num1 and num2 and divide the larger of the two by smaller.

Note: it will first be necessary to test for a zero value, since divide by zero will cause program to halt immediately.

3. The marks obtained by student in five different subjects are input through the keyboard.the student get division or grade as per the following rule:

-60% or above ---- first class

-50% to 59% ------ second class

-40% to 49% ------ third class

-Less than 40% ------ Fail

4. Solve above problem using Logical operator

5. Write a program to find all the types of roots of a given quadratic equation.

6. A bank offers 14%,15% and 16% interest on 1 year , 2 year and 3 year deposit.

Write a programme to enter rate, deposit amount. compute and print maturity amount.

**If-Else**0. Find the given number is even or odd.

**If-else-if-else**1. Write a program to calculate gross salary.

DA=70% and HRA=10% if basic salary<15000.

DA=98% and HRA=500 if basic salary>=15000.

NO DA HRA if salary <10000

2. Write a program that inputs a pair of number num1 and num2 and divide the larger of the two by smaller.

Note: it will first be necessary to test for a zero value, since divide by zero will cause program to halt immediately.

3. The marks obtained by student in five different subjects are input through the keyboard.the student get division or grade as per the following rule:

-60% or above ---- first class

-50% to 59% ------ second class

-40% to 49% ------ third class

-Less than 40% ------ Fail

**Write a program to calculate the grades obtained by the student.**4. Solve above problem using Logical operator

5. Write a program to find all the types of roots of a given quadratic equation.

6. A bank offers 14%,15% and 16% interest on 1 year , 2 year and 3 year deposit.

Write a programme to enter rate, deposit amount. compute and print maturity amount.

## 0 comments:

## Post a Comment