Sample Questions for First Internal Series – Python Lab
Simple Questions
1. Program to Reverse a Given Number
2. Program to Print all Numbers in a Range Divisible by a Given Number
3. Program to Find the Sum of Digits in a Number
4. Program to Find the Smallest Divisor of an Integer
5. Program to Print all Integers that Aren’t Divisible by Either 2 or 3 and Lie between 1 and 50.
6. Program to Read a Number n And Print the Series “1+2+…..+n= “
7. Program to Compute Simple Interest Given all the Required Values
8. Program to Generate all the Divisors of an Integer
Questions from List
9. Program to find Sum of Negative No.s, Positive Even No.s & Positive Odd numbers in a List
10. Program to Print Largest Even and Largest Odd Number in a List
11. Program to Compute a Polynomial Equation given that the Coefficients of the Polynomial are
stored in a List
12. Program to Find the Largest Number in a List
13. Program to Put Even and Odd elements in a List into Two Different Lists
14. Program to Merge Two Lists and Sort it
15. Program to Sort a List According to the Length of the Elements
Questions from String
16. Program to Remove the nth Index Character from a Non-Empty String
17. Program to Form a New String where the First Character & Last Character have been
Exchanged
18. Program to Count the Number of Vowels in a String
19. Program to Calculate the Number of Words and Number of Characters Present in a String
20. Program to Calculate the Number of Upper Case Letters and Lower Case Letters in a String
21. Program to Check if a String is a Palindrome or Not
22. Program to Form a New String Made of the First 2 and Last 2 characters from a Given String
23. Program to Count the Occurrences of Each Word in a Given String Sentence
24. Program to Check if a Substring is Present in a Given String
Questions from Set
25. Program that Displays Common Letters in Two Input Strings using Set
26. Program that Displays Letters are in the First String but not in the Second using Set
27. Program that Displays Letters are in the Two Strings but not in Both using Set
28. Program that Displays Letters are present in Both the Strings using Set