Skip to content

Commit 9c1b6ae

Browse files
Merge pull request keshavsingh4522#3 from keshavsingh4522/keshav
Keshav
2 parents c5f2332 + 174c1cb commit 9c1b6ae

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

FORKED_FOR_TSHIRT/66.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from tkinter import *
2+
from pygame import mixer
3+
root=Tk()
4+
mixer.init()
5+
def play():
6+
mixer.music.load('alan-walker-julie-bergan-seungri-Y4MZ59Tj.mp3')
7+
mixer.music.play()
8+
def stop():
9+
mixer.music.stop()
10+
def volume(val):
11+
volume=int(val)/100
12+
mixer.music.set_volume(volume)
13+
14+
Button(root,text='play',command=play).pack()
15+
Button(root,text='stop',command=stop).pack()
16+
scale=Scale(root,from_=0,to=100,orient=HORIZONTAL,command=volume)
17+
scale.set(50)
18+
scale.pack()
19+
root.mainloop()
20+

0 commit comments

Comments
 (0)