Why does the sound not play? Please fix or give me code to fix
Repl link:
import time
import pygame
from turtle import *
shape("square")
setup(1.0, 1.0)
showturtle()
pygame.init()
pygame.mixer.init()
running = True
sound = pygame.mixer.Sound('Minecraft.wav')
sound.set_volume(1.0)
sound.play(-1) # Play the sound indefinitely
while running:
print("Please verify if you would like to start this program. Type 'start' to start, type 'end' to end.")
verify = input("> ").lower()
if verify == "start":
print("Please wait...")
time.sleep(5)
print("Initializing...")
time.sleep(10)
print("Welcome to the pixel drawer. Please enjoy your time here. Use the number keys to choose drawings to view, and type 'end' to leave. If you run into problems, please restart the program.")
elif verify == "end":
running = False
break
else:
print("Try again.")
if not running:
print("Thank you. Come again soon.")
Sound on Replit is very unpredictable and doesn’t work most of the time. I wouldn’t recommend trying to play sound on Replit, I encourage you to use something else if you want to use sound. Hope this helps!
What did you change on my file? it may help. I was doing colab coding with some friends and am still experimenting with python and different python extensions