-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPractice3.py
76 lines (69 loc) · 1.76 KB
/
Practice3.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
__author__ = 'BW'
# x = int(input())
# x = 9
# for i in range(x):
# if (i < x / 2):
# n = i + 1
# else:
# n = x - i
# for j in range(n):
# if (j == 0 or j == n - 1):
# print('*', end='')
# else:
# print('+', end='')
# print()
# T = int(input())
# for t in range(T):
# size = int(input())
# n = size
# for i in range(size):
# if i < size / 2:
# n -= 1
# else:
# n += 1
# for j in range(size):
# if j < n:
# print(' ', end='')
# elif j == 0 or j == n - 1:
# print('*', end='')
# else:
# print('+', end='')
# print()
# for t in range(int(input())):
# data = input()
#
# size = len(data)
# sum = 0
# checkSum = 0
#
# for i in range(1, size):
# if i % 2 == 0:
# temp = int(data[i - 1]) * 2
# if temp > 10:
# sum += temp - 9
# else:
# sum += temp
# else:
# sum += int(data[i - 1])
#
# checkSum = sum + int(data[-1])
#
# if data[0] == '3' and size == 15 and checkSum % 10 == 0:
# print(1)
# elif data[0] == '3' and size == 14 and checkSum % 10 == 0:
# print(1)
# elif data[0] == '6' and size == 16 and checkSum % 10 == 0:
# print(1)
# elif data[0] == '5' and size == 16 and checkSum % 10 == 0:
# print(1)
# elif data[0] == '4' and (size == 13 or size == 16) and checkSum % 10 == 0:
# print(1)
# else:
# print(0)
import mp3play
filename = r'C:\Users\Public\Music\Sample Music\Kalimba.mp3'
clip = mp3play.load(filename)
clip.play()
import time
time.sleep(min(30, clip.seconds()))
clip.stop()