Simple PYTHON Programs:
Example Questions:
Q 1: Write a Python program to print "Hello, World!" Q 2: Calculate the sum of two numbers entered by the user. Q 3: Convert temperature from Celsius to Fahrenheit.
Practice Questions:
- Write a Python program to calculate the area of a rectangle given its length and width.
- Create a program that takes a user's name and age as input and prints a greeting message.
- Write a program to check if a number is even or odd.
- Given a list of numbers, find the maximum and minimum values.
- Create a Python function to check if a given string is a palindrome.
- Calculate the compound interest for a given principal amount, interest rate, and time period.
- Write a program that converts a given number of days into years, weeks, and days.
- Given a list of integers, find the sum of all positive numbers.
- Create a program that takes a sentence as input and counts the number of words in it.
- Implement a program that swaps the values of two variables.