[Go to site: main page, start]

0% found this document useful (0 votes)
11 views5 pages

Java Python Programs List

The document outlines a comprehensive list of programming exercises in Java and Python, categorized into various topics such as If-Else Programs, Looping Programs, Switch-Case, Functions & Recursion, Arrays & Matrices, and Strings. Each category contains multiple exercises aimed at enhancing programming skills through practical implementation. The exercises cover fundamental concepts including conditionals, loops, recursion, array manipulation, matrix operations, and string handling.

Uploaded by

pravallika.gcsj
Copyright
© All Rights Reserved
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% found this document useful (0 votes)
11 views5 pages

Java Python Programs List

The document outlines a comprehensive list of programming exercises in Java and Python, categorized into various topics such as If-Else Programs, Looping Programs, Switch-Case, Functions & Recursion, Arrays & Matrices, and Strings. Each category contains multiple exercises aimed at enhancing programming skills through practical implementation. The exercises cover fundamental concepts including conditionals, loops, recursion, array manipulation, matrix operations, and string handling.

Uploaded by

pravallika.gcsj
Copyright
© All Rights Reserved
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

Java & Python Programming Exercises

✅ If-Else Programs
1. Find maximum between two numbers.
2. Find maximum between three numbers.
3. Check if number is negative, positive, or zero.
4. Check if number is divisible by 5 and 11.
5. Check if number is even or odd.
6. Check if year is leap year.
7. Check if character is an alphabet.
8. Check if letter is vowel or consonant.
9. Check if character is alphabet, digit, or special character.
10. Check if character is uppercase or lowercase.
11. Input week number, print weekday.
12. Input month number, print number of days.
13. Count currency notes in amount.
14. Check if triangle is valid (angles).
15. Check if triangle is valid (sides).
16. Identify triangle type.
17. Find roots of quadratic equation.
18. Calculate profit or loss.
✅ Looping Programs
1. Print natural numbers 1 to n.
2. Print natural numbers n to 1.
3. Print a to z alphabets.
4. Print even numbers 1 to 100.
5. Print odd numbers 1 to 100.
6. Sum of natural numbers.
7. Sum of even numbers.
8. Sum of odd numbers.
9. Multiplication table.
10. Count digits.
11. First and last digit.
12. Sum of first and last digit.
13. Swap first and last digit.
14. Sum of digits.
15. Product of digits.
16. Reverse number.
17. Check palindrome.
18. Digit frequency.
19. Number in words.
20. ASCII characters.
21. Power of number.
22. All factors.
23. Factorial.
24. GCD.
25. LCM.
26. Check prime.
27. Print primes in range.
28. Sum of primes.
29. Prime factors.
30. Check Armstrong number.
31. Print Armstrong numbers.
32. Check perfect number.
33. Print perfect numbers.
34. Check strong number.
35. Print strong numbers.
36. Fibonacci series.
37. Pascal triangle.
38. Star patterns.
39. Number patterns.
✅ Switch-Case (Java Only)
1. Weekday name.
2. Days in month.
3. Vowel/consonant.
4. Max between two numbers.
5. Even or odd.
6. Positive, negative or zero.
7. Roots of quadratic equation.
8. Simple calculator.
✅ Functions & Recursion
1. Cube of number.
2. Circle diameter, circumference, area.
3. Max & Min.
4. Even or odd.
5. Prime/Armstrong/Perfect check.
6. Primes in interval.
7. Armstrong in interval.
8. Strong numbers in interval.
9. Perfect numbers in interval.
10. Power using recursion.
11. Natural numbers 1 to n (recursion).
12. Even/odd numbers in range (recursion).
13. Sum of natural numbers (recursion).
14. Sum of even/odd numbers (recursion).
15. Reverse number (recursion).
16. Palindrome check (recursion).
17. Sum of digits (recursion).
18. Factorial (recursion).
19. Fibonacci nth term (recursion).
20. GCD (recursion).
21. LCM (recursion).
22. Display array elements (recursion).
23. Sum of array elements (recursion).
24. Max & Min in array (recursion).

✅ Arrays & Matrices


Arrays:
1. Read & print elements.
2. Negative elements.
3. Sum of elements.
4. Max & Min.
5. Second largest.
6. Count even/odd.
7. Count negative.
8. Copy array.
9. Insert element.
10. Delete element.
11. Frequency of elements.
12. Unique elements.
13. Count duplicates.
14. Remove duplicates.
15. Merge arrays.
16. Reverse array.
17. Separate even & odd.
18. Search element.
19. Sort ascending/descending.
20. Sort even & odd separately.
21. Left rotate.
22. Right rotate.
Matrices:
1. Add matrices.
2. Subtract matrices.
3. Scalar multiplication.
4. Multiply matrices.
5. Check equal matrices.
6. Sum of main diagonal.
7. Sum of minor diagonal.
8. Sum of rows & columns.
9. Interchange diagonals.
10. Upper triangular.
11. Lower triangular.
12. Sum of upper/lower triangle.
13. Transpose.
14. Determinant.
15. Check identity matrix.
16. Check sparse matrix.
17. Check symmetric matrix.

✅ Strings
1. String length.
2. Copy string.
3. Concatenate strings.
4. Compare strings.
5. Lowercase to uppercase.
6. Uppercase to lowercase.
7. Toggle case.
8. Count alphabets, digits, special chars.
9. Count vowels & consonants.
10. Count words.
11. Reverse string.
12. Check string palindrome.
13. Reverse words in string.
14. First/last occurrence of char.
15. Search all occurrences of char.
16. Count char frequency.
17. Highest/lowest frequency char.
18. Frequency of each char.
19. Remove first/last/all occurrences of char.
20. Remove repeated chars.
21. Replace first/last/all occurrences of char.
22. First/last occurrence of word.
23. Search all occurrences of word.
24. Count word frequency.
25. Remove first/last/all occurrences of word.
26. Trim leading/trailing/both.
27. Remove extra blanks.

You might also like