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/ 5
Pattern Recognition
CSE 588 Dr. Dina Salem Eng.Baraa
Name/ Kareem Mohammed Elsayed
ID/ 200030812 #Sum of Two Numbers - Write a Python program that takes two numbers as input from the user and prints their sum.
2. Odd or even - Write a program to check whether a given
number is odd or even
#3. Find the Maximum - Write a Python
function that takes two numbers as arguments and returns the maximum of the two
#4. Area of a Circle - Write a Python program
that takes the radius of a circle as input and calculates its area (area = π * r^2) #5. Factorial Calculation - Write a function to calculate the factorial of a given number.
#6. Sum of a List - Write a Python program that
takes a list of numbers and returns the sum of all the elements.
#7. Count Vowels in a String - Write a Python
program that takes a string as input and counts the number of vowels in the string 8. Reverse a String - Write a Python function that takes a string as input and returns the reversed string.
#9. Check Palindrome - Write a Python program
that checks if a given string is a palindrome (reads the same forwards #and backwards).
10. Multiplication Table - Write a Python program to print the
multiplication table of a given number.
11. Check Prime Number - Write a Python program that checks
whether a given number is prime or not.
#12. Swap Two Variables - Write a Python program
to swap the values of two variables without using a third variable. 13. Grade Calculator - Write a Python program that takes a score (out of 100) as input and prints the corresponding grade: - A: 90–100 - B: 80–89 - C: 70–79 - D: 60–69 - F: <60