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

Making LCM Finding Program #10

 GREETINGS TO ALL OF YOU!!!!


Welcome everyone to our very new logic building program 

*LOWEST/LEAST COMMON MULTIPLY(LCM)


a=int(input("Enter the first number:\n"))
b=int(input("Enter the second number:\n"))

maxnum=max(a,b)

while True:
if maxnum%a==0 and maxnum%b==0:
print(f"LCM of {a} and {b} is {maxnum}")

break
maxnum+=1
OUTPUT:
Enter the first number:
8
Enter the second number:
6
LCM of 8 and 6 is 24

Thank you everyone and please do make sure you follow me on
instagram: https://www.instagram.com/vaibhavsingh_star/

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