The document contains two assignment sheets for Python programming, focusing on basic concepts and operations. Assignment Sheet-1 includes tasks such as printing messages, performing arithmetic operations, calculating interest, and working with shapes. Assignment Sheet-2 covers operators, decision control, and branching, with tasks like reversing numbers, checking leap years, generating bills, and salary sheets.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
2 views
Python_Assignment_1 and 2
The document contains two assignment sheets for Python programming, focusing on basic concepts and operations. Assignment Sheet-1 includes tasks such as printing messages, performing arithmetic operations, calculating interest, and working with shapes. Assignment Sheet-2 covers operators, decision control, and branching, with tasks like reversing numbers, checking leap years, generating bills, and salary sheets.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4
Python
Assignment Sheet-1 (Introduction)
1. Write a program in Python to print “This is my first program in Python”. 2. Write a program in Python where we take two integers as input and perform all arithmetic operations (Addition, Subtraction, Multiplication, Division, and Modulo Division). Then display all the results. 3. Write a program in Python where we take two float as input and perform all arithmetic operations (Addition, Subtraction, Multiplication, Division, and Modulo Division). Then display all the results. 4. Write a program in Python to calculate the simple interest. [ I=P*T*R/100 ] 5. Write a program in Python to calculate the compound interest. [ P+I=P*(1+R/100)^T ] 6. Write a program in Python to swap between two integers with a temporary variable. 7. Write a program in Python to swap between two integers without any temporary variable. 8. Write a program in Python where take an integer as input and print the number table of that integer. (Without using any loop) 9. Write a program in Python where we take two integers as input and perform integer division and float division operation between them separately. Then print the division result separately. 10. Write a program in Python to convert a Celsius temperature to equivalent Fahrenheit temperature. 11. Write a program in Python to convert a Fahrenheit temperature to equivalent Celsius temperature. 12. Write a program in Python where we take the length & breadth of a rectangle as input and then find the perimeter and area of it. 13. Write a program in Python where we take the radius of a circle as input and then find the perimeter and area of it.
Rajib Sengupta (ICEI) 7980170785
Python 14. Write a program in Python where we take the length of three sides of a triangle as input and then find the perimeter and area of it. 15. Write a program in Python where we take the length of three sides of a triangle as input and then find the triangle formation is possible or not.
1. Write a program in Python to perform the following operation on a three digit
number (Without Loop) – (i) Reverse (ii) Sum of Digits (iii) Palindrome Check 2. Write a program in Python to check a year is leap year or not, by using the nested decision control. 3. Write a program in Python to check a year is leap year or not, by using the ternary operator. 4. Write a program in Python to generate a mark sheet with individual marks of all subjects, total, average and letter grade/division. (Use Multiple If_Else) 5. Write a program in Python to find out the maximum and minimum between three integers inputted by user. 6. Write a program in Python to generate a telephone bill based on following information – (i) Fixed Rental charge = Rs. 250 (ii) First 50 calls charge = Nil (iii) Next 100 calls charge @ 0.80 per call. (iv) Next 250 calls charge @ 1.00 per call. (v) Next 600 calls charge @ 1.20 per call. (vi) Above 1000 calls charge @ 1.50 per call. Bill Amount = Rental Charge + Call Charge + VAT (4% of call charge) 7. Write a program in Python prepare a salary sheet based on following information – * Income Heads – (i) Basic (ii) D.A. (50% of Basic) (iii) H.R.A. (20% of Basic) Rajib Sengupta (ICEI) 7980170785 Python (iv) Medical Allowance = 500/- (fixed) * Gross Salary = Basic + DA + HRA +MA * Expenditure Heads (i) PF (12% of Basic) (ii) ESI (6% of Basic) (If Gross Salary<15000) (iii) P.Tax = 200/- (Fixed) * Net Salary = Gross Salary – Total Expenditure 8. Write a program in Python to check a user inputted number is even or odd. (Using Simple decision control) 9. Write a program in Python to check a user inputted number is even or odd. (Using ternary operator) 10. Write a program to find the sum of the integer part and fraction part separately. (Example – Input : 123.456 then Output : 6.15) 11. Write a program in Python to generate the following – Input – 52936 Output – Left to Right Right to Left 5 6 2 3 9 9 3 2 6 5