Python - Unsolved Practice Problems
Python - Unsolved Practice Problems
Q56) Write a program that will find all such numbers divisible by 7 but not a multiple of 5,
between 2000 and 3200 (both included). The numbers obtained should be printed in a
comma-separated sequence on a single line.
Q57) Write a program that calculates and prints the value according to the given formula:
Result = Square root of [(2 * C * D)/H]
Following are the fixed values of C and H: C is 50. H is 30. D is the variable whose value
should be input to your program.
Q58) Write a program, which will find all such numbers between 1000 and 3000 (both
included) such that each digit of the number is an even number. The numbers obtained should
be printed in a comma-separated sequence on a single line.
Q59) Write a program that accepts a sentence and calculate the number of letters and digits.
Use isdigit() and isalpha()
Q60) Write a program that accepts a sentence and calculate the number of upper case letters
and lower case letters. Use islower() and isupper().
Q61) Write a program that computes the value of 3 + 33 + 333 + 3333 + … + upto n terms.
Take n as input.
Q62) A website requires the users to input a username and password to register. Write a
program to check the validity of password input by users.
1. At least 1 letter between [a-z]
2. At least 1 number between [0-9]
1. At least 1 letter between [A-Z]
3. At least 1 character from [$#@]
4. Minimum length of transaction password: 6
5. Maximum length of transaction password: 12
Q63) Take the number of days as input. Print the number of months, number of weeks, and
number of days. Assume each month to have 30 days. For example, giving 895 as input will
give the answer as 29 months, 3 weeks, and 4 days.
Q64) Print the sum of the series 1 + 1/(2*3) - 2/(2*4) + 3/(4*5) – 4/(5*6) + 5/(6*7) – 6/(7*8)
+ … + upto n terms. Take n as input.
Q65) Print the sum of the first n terms of the Fibonacci series. Take n as input.