67 Python Questions

 1. Write a function that checks if a number is an Armstrong number. 

 2. Write a Python program that takes a number as input and calculates its square using the exponentiation assignment operator. 

3. Write a program to find Factorial of “n” (a) using for loop (b) using Recursion where “n” is given by the user. 

4. Write a python code to find out the sum of 5 + 55 + 555 + 5555 + 55555 +…. 

5. STR = “BUSINESSMAN”. Determine (a) STR[3:], (b) STR[1:5] (c) STR[:-2] (d) STR[::-2] 

6. Write a function that counts the number of words in a sentence. 

7. Write a program to display Fibonacci Series using Recursion. 

8. Write a program that takes a year as input and determines whether it's a leap year or not. 

9. Write a python code to print even numbers from 5 to 25 and calculate the sum and average. 

10.STR = “ABCDEFG”. Print the reverse of the given string after replacing “ABC” with “PQR”

Post a Comment

Post a Comment (0)

Previous Post Next Post