Tag : python

print “Enter your first number” num1= int(input()) print “enter your second number” num2= int(input()) print “what would you like to do?” operation = input() if operation == “subtraction” or “-“: print (num1-num2) elif operation == “addition” or “+”: print (num1+num2) elif operation == “multiplication” or “*” or “X” or “x”: print (num1*num2) elif operation == ..

Read more

Read more

Iterate over each sentence and its corresponding image for sentence, image_path in zip(sentences, image_paths): # Open image image = Image.open(image_path) draw = ImageDraw.Draw(image) draw.text((10, 10), sentence, font=font, fill=text_color) # Draw sentence text on image # Display image image.show() # Wait for 2 seconds time.sleep(2) # Speak sentence engine.say(sentence) engine.runAndWait() # Find window by title window_title ..

Read more