Professional Documents
Culture Documents
# N natural number
n = int(input("Enter range: ")) #10
while(n!=0):
print(n, end=" ")
n = n - 1
# Factorial of a number
n = int(input("Enter number: ")) # 5
if(n == 0 or n < 0):
print("Value of n should be greater than 1")
else:
fact = 1
while(n):
fact *= n
n = n-1
print(f"Factorial is {fact} ")
for i in range(n,0,-1):
for j in range(i):
print('* ', end="")
print('')
Find out the answers for the below programs
6. Program to Count the Number of Vowels in a string and print the vowels
7. To print a string in reverse order.
8. To find a number from a list of 10 numbers.
9.