Practice Problems
Practice Problems
2. To print all prime numbers in the fibonacci series below a given number.
7. To Calculate the batting average of a player. Take the batting scores of last 10
matches and the number of not outs.
8. To print the highest score of a player given the last 5 scores. (Note:Dont use list)
9. To print the biggest and smallest of 10 given numbers. (Note:Dont use list)
11. To print a particular digit in a given number (Input: number and place of digit)
14. Calulcate the compound interest of an amount p with rate r% for n years
compounded annually.
Using Lists:-
1. Read elements in an List and print the elements in List in reverse order.
2. To print the fibonacci series of a given number in reverse order.(Note: Use List)
4. Generate n number of random numbers, store in an List and print the even
numbers.
5. To print the highest score of a player given the last 5 scores.(Note: Use List)
9. To swap the numbers of 2 Lists. Read the values in 2 Lists and swap the contents.
10. Read elements in an List and add the values of alternative positions (1,3,5...) and
print the sum.
11. Read elements in an List and multiply each value with 5 and store the result in a
new List.
12. Read elements in 2 Lists of size n and add the 1st element of first List with last
element of
second List, 2nd element of first List to last-1 element of second List and so on and
store
the result in a new List.
13. Read elements in an List and print the positions of odd numbers in the List.
14.Read elements in an List and print the prime numbers and their positions in the
List.
These are the models given by our mentors for us to practice.
I want some more models to practice .
Now here we are doing these programs in python language.
If you have questions in any other language kindly send them.
Thank you,
Yours kindly,
A.MadhaviLatha.