Skip to main content

Code #11 Speak Function

                GREETINGS TO ALL YOU!!!! This is text to speak converter Function from  win32com.client  import  Dispatch def   speak (str):     speak = Dispatch( "SAPI.spVoice" )     speak.Speak( str ) if  __name__  ==   "__main__" :     speak("# your text goes here")

Code#5 PRIME NUMBER PROGRAM

         GREETINGS TO ALL OF YOU!!!!!!!!!!!!!

# WELCOME EVERY ONE WE ARE HERE TO HAVE A PROGRAM ON PRIME NUMBER 

# WE WILL HAVE TWO PROGRAM 

# 1. TO IDENTIFY THAT THE GIVEN NUMBER IS A PRIME NUMBER OR NOT  

# 2. TO PRINT ALL THE PRIME NUMBER FROM 1 TO N


# 1) Pyhton program for indentifying which is a PRIME NUMBER 

n=int(input("pls enter your number:.....\n"))


flage = 0

for i in range(2,n):
if n % i == 0:
flage = 1
if flage == 0:
print("it is a prime number")
else:
print("it is not a prime number")

#2) Python program for printing all prime number from 1 to N


n=int(input("Enter the starting number:....."))
q=int(input("enter the ending number:..."))

for i in range (n,q+1):
flage = 0
for j in range(2,i):
if i % j==0:
flage=1

if flage==0:
print("it is a prime number: ",i)


 thanks guys for joining me

Comments

Popular posts from this blog

Code#3 Factorial problem, Recursion and Iterative Method PROGRAM

GREETINGS TO ALL OF YOU!!  Factorial problem, Recursion and Iterative Method   #  Recursion Method  def fac2 (n): if n== 1 : return 1 else : return n*fac2(n- 1 ) number = int ( input ( "enter your number" )) print ( 'factorial of your given number by recursion method :' ,fac2(number)) # Iterative Method  def fac1 (n): fac= 1 for i in range (n): fac=fac*(i+ 1 ) return fac number= int ( input ( "enter your number: " )) print ( "factorial of your given number by iterative method:" ,fac1(number))

Code #11 Speak Function

                GREETINGS TO ALL YOU!!!! This is text to speak converter Function from  win32com.client  import  Dispatch def   speak (str):     speak = Dispatch( "SAPI.spVoice" )     speak.Speak( str ) if  __name__  ==   "__main__" :     speak("# your text goes here")