Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 689b76b

Browse files
Day 5 Training Session
1 parent 509caba commit 689b76b

File tree

5 files changed

+95
-0
lines changed

5 files changed

+95
-0
lines changed

‎Training/Anagram.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
3+
Anagram
4+
5+
"""
6+
7+
s=input()
8+
a=input()
9+
print(sorted(a)==sorted(s))

‎Training/HollowDiamond.py

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
'''
2+
3+
Hollow Diamond
4+
5+
Input: 4
6+
7+
Output:
8+
1
9+
2 2
10+
3 3
11+
4 4
12+
3 3
13+
2 2
14+
1
15+
16+
'''
17+
18+
n=int(input())
19+
20+
for i in range(1,n+1):
21+
for j in range(1,n+n+1):
22+
if(j==n-i+1 or j==n+i-1):
23+
print(i,end="")
24+
else:
25+
print(end=" ")
26+
print()
27+
for i in range(n-1,0,-1):
28+
for j in range(1,n+n+1):
29+
if(j==n-i+1 or j==n+i-1):
30+
print(i,end="")
31+
else:
32+
print(end=" ")
33+
print()

‎Training/Isogram.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'''
2+
3+
Isogram
4+
5+
'''
6+
7+
a=input()
8+
char=[]
9+
f=0
10+
for i in a:
11+
if i in char:
12+
f=1
13+
char.append(i)
14+
if f==0:
15+
print("Isogram")
16+
else:
17+
print("Not Isogram")

‎Training/Panagram.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'''
2+
3+
Panagram
4+
5+
'''
6+
7+
a="abcdefghijklmnopqrstuvwxyz"
8+
s=input().lower()
9+
f=0
10+
for i in a:
11+
if i not in s:
12+
f=1
13+
break
14+
if f==0 :
15+
print("Panagram")
16+
else:
17+
print("Not Panagram")

‎Training/UniqueCharacter.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
'''
2+
3+
Unique Character of two string and print in ascending order
4+
5+
'''
6+
7+
a=input()
8+
b=input()
9+
s=set()
10+
for i in a:
11+
if i not in b:
12+
s.add(i)
13+
14+
for i in b:
15+
if i not in a:
16+
s.add(i)
17+
s=list(s)
18+
s=sorted(s)
19+
print(s)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /