Skip to content

Latest commit

 

History

History

001. Write a program to take 2 number inputs from user and interchange the values.

002. Write a program to take 4 digit number from user and print sum of first and last digit.
Ex. 2368 = 2 + 8 = 10

003. Write a program to take value in km from user and convert km into cm, meter, feet and inch and print them.

004. Write a python program in which input 5 subject marks and calculate total, percentage and result (Pass or Fail).

005. Write a program which takes input value for age from user and display message if user is eligible for vote.

006. Write a program which takes input of 1 number and display whether the number is positive or negative.

007. Write a program which takes input of 2 numbers and operator, and display result as per input operator.

008. Write a program which takes input of income and gender, and display message whether income is taxable or not as per following condition:
- if gender = male and income is greater than 700000 and
- if gender = female and income is greater than 500000 display message taxable.

009. Write a program to calculate bill payment as per following condition:
take input of product id, product name, price and quantity and
calculate discount as per following condition:
-> if purchase amount is greater than 5000 then calculate discount 20%
-> if purchase amount is between 3000 to 5000 then calculate discount 15%
-> if purchase amount is between 1000 to 3000 then calculate discount 10%
-> if purchase amount is below 1000 then calculate discount 5%
and finally display product id, product name, price, quantity, discount and final_payment.

010. Write a program to print 1 to 10 number using while loop.

011. Write a program to print even number up to n length using while loop.

012. Write a program to print 1 to 10 numbers using for loop.

013. Write a program to print multiplication table of given number using while and for loop.

014. Right-Angled Triangle
*
* *
* * *
* * * *
* * * * *

015. Inverted Right-Angled Triangle
* * * * *
* * * *
* * *
* *
*

016. Pyramid Pattern
*
* *
* * *
* * * *
* * * * *

017. Inverted Pyramid
* * * * *
* * * *
* * *
* *
*

018. Diamond Pattern
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
*

019. Number Triangle
1
1 2
1 2 3
1 2 3 4

020. Floyd’s Triangle
1
2 3
4 5 6
7 8 9 10

021. Pascal’s Triangle
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

022. Right-Angle Number Pyramid
1
2 2
3 3 3
4 4 4 4

023. Hollow Pyramid
*
* *
* *
*
* * * *