Python-100-Programmes-Lists
Write a program to input your name and print it.
Input your age and print “You are X years old”.
Input “ Welcome to Python Programming” message and display it.
Input two numbers and display their Sum, Difference, Multiplication, Division, Square, and Cube.
Enter a number and print the next and previous numbers.
Input two numbers and swap them.
Convert kilometers to meters.
Convert Celsius temperature to Fahrenheit.
Convert Fahrenheit temperature to Celsius.
Input the Length and Breadth of a rectangle and find its Area and perimeter.
Input the side of a square and find its Area and perimeter.
Input the radius of a circle and find its Area and Perimeter.
Enter the base and height, and find the triangle’s area.
Input a number and find its remainder when divided by 7.
Input three numbers and find their average.
Find simple interest (SI = P × R × T / 100).
Find compound interest.
Input the price and discount %, and find the final price.
Input marks of 5 subjects and find the total and percentage.
Convert hours to minutes and seconds.
Input principal, rate, time, and calculate EMI.
Check if a number is even or odd.
Check if a number is positive, negative, or zero.
Input a number and check if it is divisible by 3.
Check if a given year is a leap year.
Input two numbers and display the larger / smaller number.
Input three numbers and display the largest / smallest number.
Check if a character is a vowel or a consonant.
Check if a character is uppercase or lowercase.
Check if a character is a digit.
Input a string and convert the case of characters.
Check if a number is a single-digit, two-digit, three-digit, or more.
Print grade based on marks:
A(80+), B(60-79), C(40-59), D(33-39), F(<33)
Check if a number is divisible by 2, 3, and 5.
Print 1 to 100.
Print 100 to 1.
Print multiplication table of any number.
Print all even numbers between 1 and 100.
Print all Odd numbers between 1 and 100.
Print sum of first 10 natural numbers.
Print sum of numbers from 1 to n.
Print factorial of a number.
Print Fibonacci series up to n terms.
Count digits in a number.
Determine whether a number is a perfect number.
Determine whether a number is an Armstrong number.
Determine whether a number is a palindrome.
Determine whether a number is a perfect number, an Armstrong number, or a palindrome.
Enter a string and check if it is a palindrome.
Input a number and check if the number is a prime.
Input a number and check if the number is composite.
Reverse a number using a loop.
Find the sum of the digits of a number.
Print all prime numbers between 1 and 100.
Print all numbers divisible by 3 or 5 from 1 to 100.
Print the largest and smallest digit in a number.
Count and display the number of vowels, consonants, uppercase, and lowercase characters in the string.
Generate the following patterns using nested loops:
*
**
***
****
*****
Generate the following patterns using nested loops:
12345
1234
123
12
1
Generate the following patterns using nested loops:
A
AB
ABC
ABCD
ABCDE
Write a program to input the value of x and n and print the sum of the following series:
1 + x + x2 + x3 + x4 +……….+xn
Write a program to input the value of x and n and print the sum of the following series:
1 – x + x2 – x3 + x4 -……….+xn
Write a program to input the value of x and n and print the sum of the following series:
x +x2/2 + x3/3 + x4/4 + …………..+xn/n
Write a program to input the value of x and n and print the sum of the following series:
x +x2/2! + x3/3! + x4/4! + …………..+xn/n!
Compute the Greatest Common Divisor (GCD) of two integers.
Compute the Least Common Multiple (LCM) of two integers.
Count vowels in a string.
Count consonants in a string.
Count uppercase letters in a string.
Count lowercase letters in a string.
Count digits in a string.
Count spaces in a string.
Count words in a sentence.
Convert the string to uppercase.
Convert the string to lowercase.
Input a sentence and find how many Vowels, Consonants, Uppercase letters, Lowercase letters, Digits, words, and spaces belong to the sentence.
Remove all spaces from a string.
Find the length of a string without using len().
Reverse a string without using slicing.
Create a list and print all elements.
Input 10 numbers in a list and print them.
Find the largest number in a list.
Find the smallest number in a list.
Count even numbers in a list.
Count odd numbers in a list.
Search for an element in a list.
Reverse a list without using reverse().
Swap even-index elements with odd-index elements.
Remove duplicates from a list.
Find the largest/smallest number in a list.
Input a list of elements, search for a given element in the list.
Write a random number generator that generates random numbers between 1 and 6.
Create a function to add two numbers.
Create a function to find the square of a number.
Create a function that returns the cube of a number.
Create a function to check if a number is prime.
Create a function to calculate simple interest.
Create a function that returns the largest of three numbers.
Write a function that takes a list of numbers and returns the sum of all elements.
Write a function that takes a string and returns the number of vowels in it.