from replit import audio
import os, time
print("🎵 MyPOD Music Player")
def play(pt):
source = audio.play_file('audio.wav')
source.paused = False # unpause the playback
while True:
pt = input(
"Press 1 to Play . Press 2 to Exit . Press anything else to see the menu again."
)
if pt == "2":
source.paused = True
break
# Start taking user input and doing something with it
#input("Press 1 to Play , Press 2 to Exit ,Press anything else to see the menu again.")
while True:
# clear the screen
os.system("clear")
# Show the menu
print("🎵 MyPOD Music Player")
# take user's input
pt = input(
"Press 1 to Play . Press 2 to Exit . Press anything else to see the menu again."
)
play(pt)
# check whether you should call the play() subroutine depending on user's input