-
Notifications
You must be signed in to change notification settings - Fork 0
/
backgrounds.py
38 lines (30 loc) · 875 Bytes
/
backgrounds.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
#background settup
from random import*
spring=[] #themes
summer=[]
fall=[]
winter=[]
season_list=[]
for i in range(1,5): #loads all the backgrounds for each theme
spring.append('spring'+str(i)+'.jpg')
summer.append('summer'+str(i)+'.jpg')
fall.append('autumn'+str(i)+'.jpg')
winter.append('winter'+str(i)+'.jpg')
def background(topic): #randomly selects a picture from a theme and returns it
if topic==1:
season_list=spring
season='spring'
image=choice(season_list)
elif topic==2:
season_list=summer
season='summer'
image=choice(season_list)
elif topic==3:
season_list=fall
season='fall'
image=choice(season_list)
else:
season_list=winter
season='winter'
image=choice(season_list)
return image,season