0% found this document useful (0 votes)
16 views1 page

Python If - Else Question For Practice

Uploaded by

Ariful Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views1 page

Python If - Else Question For Practice

Uploaded by

Ariful Hasan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1.

Take 2 numbers from the user and print the difference between them

2. Take values of length and width of a quadrilateral from user and check if it
is square or not.

3. Write a program to check if a year is leap year or not.


If a year is divisible by 4 then it is leap year but if the year is century year
like 2000, 1900, 2100 then it must be divisible by 400.

4. A student will not be allowed to sit in exam if his/her attendence is less


than 75%.

Take following input from user:


Number of classes held
Number of classes attended.
Print percentage of class attended and If student is allowed to sit in exam
or not.

N.B: Allow student to sit if he/she has medical cause. Ask user if he/she
has medical cause or not ( 'Y' or 'N' ) and print accordingly.

5. Calculate how much tax the user have to pay


● Age<18 = No Tax
● Income<10000= No Tax
● If income<=20000, Tax= 5% of income
● If income>20000, Tax= 10% of income

You might also like