Name:Vedant Ajay Deshmukh
UID:2025300051
1)Problem 1: Given a number, write a program using while loop to reverse the digits of the
number. For example, the number 12345 should be written as 54321.
Code:
Output:
2)Write a program to evaluate the following investment equation
V = P(1+r)n and print the tables which would give the value of V for various combinations of the
following values of P, r and n.
P: 1000, 2000, 3000,..... 10,000
r: 0.10, 0.11, 0.12,....., 0.20
n: 1, 2, 3,... 10
(Hint: P is the principal amount and V is the value of money at the end of n years. This equation
can be recursively written as V= P(1+r) P=V That is, the value of money at the end of first year
becomes the principal amount for the next year and so on).
Code:
Output:
3)Write a program to print the following output using for loops.
Code:
Output: