Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions four.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
num1=int(input())
num2=int(input())
num3=int(input())

for i in range(1,num1*num2*num3):
if(str(i) == str(i)[::-1]):
if(i>2):
for a in range(2,i):
y = True
if(i%a==0):
y = False
break
if y:
print(i)

# i really dont understand what is the palindromic number. because of this reason,
# i take this loop from the internet but i understand how it is created. thx

25 changes: 25 additions & 0 deletions home_work_one.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@


def shift(a):
list=a
number=int(input())
if number>0:
c=0-number
b=list[:c]
a=[]
d=-1
while number>0:
a.append(list[d])
number-=1
d-=1
a.extend(b)
print(a)
elif number<0:
c=list[number-1:]
d=list[:number-1]
c.extend(d)
print(c)


shift([1,2,3,4,5])

19 changes: 19 additions & 0 deletions three.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
a=set(input())
b=set(input())
d=[]
def sort():
c.sort()
b=''
for i in c:
b+=i
c.clear()
d.append(b)

c=[]
c.extend(a.intersection(b))
sort()
c.extend(a-b)
sort()
c.extend(b-a)
sort()
print(d)
16 changes: 16 additions & 0 deletions two.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
a=input()
print(a.count('b'))
c=0
b=len(a)
z=[]
while b>0:
d=(a[c],a.count(a[c]))
if d not in z:
z.append(d)
b-=1
c+=1
print(z)