Programs CSE-A1 Python
Programs CSE-A1 Python
1. Develop a python program using switch case to print the Basic Salary
according to the Job Band (Declare Job Band as char variable). The details
are as follows:
16. Develop a python program that takes from user an arithmetic operator [+,-
,*,/] and two operands. Perform corresponding arithmetic operation on the
operands using elif statement.
17. Develop a python program to print fibonacci series up to n terms.
18. Develop a python program to reverse the given number and check
whether it is palindrome or not.
19. Develop a python program to check whether the given number is prime or
not.
20. An electricity board charges the following rates for the use of electricity: for
the first 200 units 80 paisa per unit: for the next 100 units 90 paisa per unit:
beyond 300 units Rs. 1 per unit. All users are charged a minimum of Rs. 100
as meter charge. If the total amount is more than 400, then an additional
surcharge of 15% of total amount is charged. Develop a python program to
read the name of the user, number of units consumed and print out the
charges.
21. Develop a python program to find the value of sum where
sum=1+1/2x+1/3x2+1/4x3+.......1/nxn-1.
22. Compound Interest Calculator
Develop a Python program to calculate the compound interest for a given
principal amount, interest rate, and time period. Use the formula:
A=P(1+n/r)nt
Where:
A = Final amount
P = Principal amount
r = Annual interest rate (in decimal form)
n = Number of times interest is compounded per year
t = Number of years
23. Develop a python program to swap the two numbers using swap().
24. Develop a python program to generate prime numbers between the given
range using function.
25. Develop a python program to find sum of first n numbers using function.
26. Develop a Python program to calculate the compound interest for a given
principal amount, interest rate, and time period.
38. Write a Python program to convert a decimal number to its binary, octal,
and hexadecimal equivalents.
29. Develop a Python program to find the longest word in a given sentence
without using built-in functions.
30. Create a Python program to implement a simple calculator that can perform
addition, subtraction, multiplication, and division operations on two numbers
using functions.
31. Write a Python program to check if a given string is a pangram (contains all
letters of the alphabet).