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#1 ( For Making A Calculator) PROGRAM

 print("opration you can perform are:-")

      "|addition +"
"|subtraction -"
"|multiplication *"
"|division/"
"|exponent **")

while True:
num1=float(input("enter your number: "))
opration=(input("enter your oprator: "))
num2=float(input("enter 2nd number: " ))
if(opration=='+'):
print(num1+num2)
elif(opration=='-'):
print(num1-num2)
elif(opration=='*'):
print(num1*num2)
elif(opration=='/'):
print(num1/num2)
elif (opration=='**'):
print (num1**num2)
a=input("do you want to continue, if yes write yes and if no write no:......")
if a=='yes':
continue
elif a=='no':
break


print("thank you !!!!!!")

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")