Ask coding questions

← Back to all posts
abheer (7)

I want to ask that how we can give background sound to our game in python?

msaunby (2)

A simple beep is possible in Python, and other languages, by printing an ascii bell character.
print("\a") or print("\7") will do this. A few of these with a short sleep() between them can be useful.

Aaryan0405 (0)

@msaunby i did while true loop and did it undreneath. Sounded terrible

timmy_i_chen (1188)

Unfortunately sound doesn't work on, since all your code runs on a virtual machine far away (it doesn't run on your local computer), and we don't pipe sound over to the terminal. :(

eventiger2018 (1)

@timmy_i_chen i was wondering why sound did not work!

Hidere0225 (1)

@timmy_i_chen I almost devoted my entire afternoon to try to create sound for my repl. Thanks so much bro!