-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproject16.py
72 lines (52 loc) · 1.05 KB
/
project16.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
for i in range(4):
for j in range(4):
print("# ",end="")
print()
for i in range(5):
for j in range(i):
print("# ",end="")
print()
print()
for i in range(4,0,-1):
for j in range(i):
print("# ",end="")
print()
print()
for i in range(4):
for j in range(4-i):
print("# ",end="")
print()
print()
for i in range(1,5):
for j in range(i,5):
print(j , end="")
print()
print()
string = '1234'
for i in range(len(string)):
print(string[i:])
print()
for i in range(1, 5):
for j in range(1,6-i):
print(j, end="")
print()
print()
for i in range(1, 5):
for j in range(1,6-i):
print(i, end="")
print()
print()
str1="ABCD"
str2="PQR"
for i in range(4):
for j in range(i+1):
print(str1[j], end="")
for k in range(i,3):
print(str2[k], end="")
print()
print()
for i in range(4):
print(str1[:i+1], end="")
print(str2[i:3], end="")
print()
print()