A. Write a program using the while loop to read the positive integer and count the number of decimal digits in a positive integer.
B. Write a program to read the password from a user. If the user types the correct password,
i.e. “Python” then display the message, “Welcome to Python Programming”.
Note: Only three attempts are allowed to enter the right password.
C. Write programs for the following series using the while loop.
a. x+x2/2!+x3/3!+..n
b. 1+x+x2+x3+….xn
D. Consider a scenario where a son eats five chocolates every day. The price of each chocolate
is different. His father pays the bill to the chocolate vendor at the end of every week.
Develop a program that can generate the bills for the chocolates and send to the father. Also
state which loop will be used to solve this problem.
Leave a Reply