Skip to content

Commit 7808cf8

Browse files
authored
Add files via upload
1 parent acb2275 commit 7808cf8

File tree

3 files changed

+199
-199
lines changed

3 files changed

+199
-199
lines changed

calendar_1.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import calendar
2-
yy = 2023 #year
3-
mm = 5 # month
4-
#display the calendar
5-
print(calendar.month( yy, mm))
1+
import calendar
2+
yy = 2023 #year
3+
mm = 5 # month
4+
#display the calendar
5+
print(calendar.month( yy, mm))

christmastree.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import colorama, random
2-
from colorama import Fore
3-
colorama.init(autoreset = True)
4-
num_rows = 30
5-
colors = [Fore.RED,Fore.YELLOW,Fore.GREEN,Fore.BLUE,Fore.MAGENTA]
6-
for i in range(0, num_rows):
7-
for j in range(0, num_rows-i-1):
8-
print(end=" ")
9-
for j in range(0,i+1):
10-
print(random.choice(colors) +"#", end=" ")
11-
print()
12-
print(Fore.BLACK+" ",random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"#")
13-
print(Fore.BLACK+" ",random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"#")
1+
import colorama, random
2+
from colorama import Fore
3+
colorama.init(autoreset = True)
4+
num_rows = 30
5+
colors = [Fore.RED,Fore.YELLOW,Fore.GREEN,Fore.BLUE,Fore.MAGENTA]
6+
for i in range(0, num_rows):
7+
for j in range(0, num_rows-i-1):
8+
print(end=" ")
9+
for j in range(0,i+1):
10+
print(random.choice(colors) +"#", end=" ")
11+
print()
12+
print(Fore.BLACK+" ",random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"#")
13+
print(Fore.BLACK+" ",random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"#")
1414
print(Fore.BLACK+" ",random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"# "+random.choice(colors)+"#")

0 commit comments

Comments
 (0)