[go: up one dir, main page]

0% found this document useful (0 votes)
15 views2 pages

If Else

The document outlines ten programming tasks in Python, including calculating student divisions based on marks, sorting numbers, validating triangles, analyzing job eligibility by age, calculating quadratic equation roots, determining profit or loss from sales, checking admission eligibility for courses, identifying character types, calculating electricity bills, and classifying triangles. Each task emphasizes the use of conditional statements and logical operators. The document serves as a guide for practicing basic programming concepts and problem-solving in Python.

Uploaded by

as.business.023
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)
15 views2 pages

If Else

The document outlines ten programming tasks in Python, including calculating student divisions based on marks, sorting numbers, validating triangles, analyzing job eligibility by age, calculating quadratic equation roots, determining profit or loss from sales, checking admission eligibility for courses, identifying character types, calculating electricity bills, and classifying triangles. Each task emphasizes the use of conditional statements and logical operators. The document serves as a guide for practicing basic programming concepts and problem-solving in Python.

Uploaded by

as.business.023
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/ 2

1.

Write a program to display the division of a student as per the user inputted marks
using if else and logical operator.

First division >= 75


Second division >= 65
Third division >= 55
Fourth division < 55

2. Write a program to sort the user inputted three numbers in ascending order.

3. Write a python program to input side of a triangle and check whether triangle is
valid or not using if else. How to check whether a triangle can be formed or not if
sides of triangle are given using if else in python programming. Logic to check
triangle validity if sides are given in python program.

4. Program for analysis of people of certain age groups who are eligible for getting a
suitable job if their condition and norms get satisfied using nested if statement.

5. Write a python program to calculate the root of a Quadratic Equation.

6. Write a python program to input cost price and selling price of a product and
check profit or loss. Also calculate total profit or loss using if else. How to
calculate profit or loss on any product using if else in python programming.
Program to calculate profit and loss of any product in python.

7. Write a python program to find the eligibility of admission for a professional


course based on the following criteria:

Marks in Maths >=65


Marks in Physics >=55
Marks in Chemistry >=50
Total in all three subject >=180
Or
Total in Math and Subjects >=140

8. Write a python program to check whether a character is an alphabet, digit or


special character.

9. Write a python program to input electricity unit charge and calculate the total
electricity bill according to the given condition:
For first 50 units Rs. 0.50/unit

For next 100 units Rs. 0.75/unit


For next 100 units Rs. 1.20/unit

For unit above 250 Rs. 1.50/unit

An additional surcharge of 20% is added to the bill.

How to calculate electricity bill using if else in python programming. Program to


find electricity bill using if else in python. Logic to find net electricity bill in
python program.

10. Write a python program to check whether a triangle is Equilateral, Isosceles


or Scalene.

Equilateral triangle: An equilateral triangle is a triangle in which all three sides are
equal. In the familiar Euclidean geometry, equilateral triangles are also equiangular;
that is, all three internal angles are also congruent to each other and are each 60°.

Isosceles triangle: An isosceles triangle is a triangle that has two sides of equal
length.

Scalene triangle: A scalene triangle is a triangle that has three unequal sides, such as
those illustrated above.

You might also like