Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added Book1.xlsx
Binary file not shown.
146 changes: 146 additions & 0 deletions Euler.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
import math
import functools
""" 1-ci sual
def check(x):
if x%3==0 or x%5==0:
return True
else:
return False

sum=0
for i in range(1,1000):
if check(i):
sum+=i
print(sum)"""

# 2-ci sual
"""fibo_list=list()
fibo_list.append(1)
fibo_list.append(2)
index=2
while True:
if fibo_list[index-2]+fibo_list[index-1]<4000000:
fibo_list.append(fibo_list[index-2]+fibo_list[index-1])
index+=1
else:
break
sum=0
for i in fibo_list:
if i%2==0:
sum+=i
print(sum)
print(index)"""

# 3-cu sual
"""def funksiya(x):
check=True
for j in range(2,int(math.sqrt(x))+1):
if x%j==0:
check=False
continue
return check

num=600851475143
biggist=1
for i in range(2,int(math.sqrt(num))):
if num%i==0 and funksiya(i):
biggist=i
print(biggist)"""

# 4-cu sual
"""def polindrom(x):
if str(x)==str(x)[::-1]:
return True
else:
return False
big_poli=0
for i in range(100,1000):
for j in range(100,1000):
if polindrom(i*j) and i*j>big_poli:
big_poli=i*j
print(big_poli)"""

# 5-ci sual
"""def gcd(x,y):
return math.gcd(x,y) #EBOB
def lcm(x,y):
return (x*y)//gcd(x,y) # EKOB
liste=range(1,21)
netice=functools.reduce(lcm,liste)
print(netice)"""

# 6-ci sual
"""def kvadrat():
sum=0
for i in range(1,101):
sum+=i*i
return sum
def cem_kvadrat():
cem=0
for i in range(1,101):
cem+=i
return pow(cem,2)
print(cem_kvadrat()-kvadrat())"""

# 7-ci sual
"""say=0
def prime_check(x):
check=True
if x==2:
return True
else:
for i in range(2,int(math.sqrt(x)+1)):
if x%i==0:
check=False
break
return check

i=2

while True:
if prime_check(i):
say+=1
if say==10001:
print(i)
break
i+=1"""

# 8-ci sual
sayi = """73167176531330624919225119674426574742355349194934
96983520312774506326239578318016984801869478851843
85861560789112949495459501737958331952853208805511
12540698747158523863050715693290963295227443043557
66896648950445244523161731856403098711121722383113
62229893423380308135336276614282806444486645238749
30358907296290491560440772390713810515859307960866
70172427121883998797908792274921901699720888093776
65727333001053367881220235421809751254540594752243
52584907711670556013604839586446706324415722155397
53697817977846174064955149290862569321978468622482
83972241375657056057490261407972968652414535100474
82166370484403199890008895243450658541227588666881
16427171479924442928230863465674813919123162824586
17866458359124566529476545682848912883142607690042
24219022671055626321111109370544217506941658960408
07198403850962455444362981230987879927244284909188
84580156166097919133875499200524063689912560717606
05886116467109405077541002256983155200055935729725
71636269561882670428252483600823257530420752963450"""
liste = sayi.split("\n")
print(liste)
number = ""
for i in liste:
number += i
product = 0
for i in range(0, len(liste)-12):
aux = 1
for j in number[i:i+13]:
aux *= int(j)
if aux > product:
product = aux
print(product)





1 change: 1 addition & 0 deletions Factorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
faktorial *=say1
say1+=1
print(f"{say1} ! = {faktorial}")"""

59 changes: 59 additions & 0 deletions List Comprehension.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
liste=[1,2,3,4,5,6,9]
"""list1=[]
for i in list:
list1.append(i)
print(list1)
list2=[i for i in liste]
print(list2)"""

"""list1=[]
for i in list:
list1.append(i*i)
print(list1)
list2=[i*i for i in liste]
print(list2)"""

"""list1=[]
for i in liste:
if i%2 ==0:
list1.append(i)
print(list1)
list2=[i for i in liste if i%2 ==0]
print(list2)"""

"""list1=[]
for i in list:
if i%2 ==0:
continue
list1.append(i)
print(list1)
list2=[i for i in list if not i%2 ==0]
print(list2)"""

"""list1=[]
letter="abc"
for i in liste:
for j in letter:
list1.append((i,j))
print(list1)
list2=[(i,j) for i in liste for j in letter]
print(list2)"""

"""list_=[(1,2,3),(4,5,6),(7,8,9)]
list1=[]
for i in list_:
for j in i:
list1.append(j)
print(list1)
list2=[j for i in list_ for j in i]
print(list2)"""

print(dir(list))
list_method=[]
for method in dir(list):
if method.startswith("__"):
continue
list_method.append(method)
print(list_method)
list_method1=[method for method in dir(list) if not method.startswith("__")]
print(list_method1)
20 changes: 20 additions & 0 deletions Mixdata.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Ad-Soyad Specality point1/point2/final
Delal-Abdullatif-Abzak Fizik 100/100/68
Fatma-Özlem-Acar Matematik Müh 60/90/100
Özde-Acarkan Kimyager 75/70/83
Atahan-Adanır Bilgisayar Bil 30/40/65
Hacı-Mehmet-Adıgüzel Sanat Öyr 67/89/90
Mükerrem-Zeynep-Ağca Fizik 40/50/73
Bestami-Ağırağaç Bioloji 90/90/90
Aykanat-Ağıroğlu Türkçe Bil Ara 75/85/97
Şennur-Ağnar Kimyager 89/70/81
Tutkum-Ahmadı-Asl Tıbb 50/50/70
Mügenur-Ahmet Bilgisayar Müh 60/50/69
Sevinç-Ak Tıbb 88/77/71
Kayıhan-Nedim-Akarcalı Bilgisayar Bil 100/100/97
Lemi-Akarçay Fizik 51/51/98
Cihan-Akarpınar Bioloji 78/56/93
Rafi-Akaş Matematik Müh 55/62/56
Mehmetcan-Akay Teknoloji Uzm 78/79/80
Nuhaydar-Akbilmez Türkçe Bil Ara 45/55/67
Emine-Münevver-Akca Sanat Öyr 88/75/96
11 changes: 11 additions & 0 deletions Newdata1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Fatma Özlem Acar Matematik Müh 85.0 Passed
Özde Acarkan Kimyager 76.7 Passed
Hacı Mehmet Adıgüzel Sanat Öyr 82.8 Passed
Bestami Ağırağaç Bioloji 90.0 Passed
Aykanat Ağıroğlu Türkçe Bil Ara 86.8 Passed
Şennur Ağnar Kimyager 80.1 Passed
Sevinç Ak Tıbb 77.9 Passed
Kayıhan Nedim Akarcalı Bilgisayar Bil 98.8 Passed
Cihan Akarpınar Bioloji 77.4 Passed
Mehmetcan Akay Teknoloji Uzm 79.1 Passed
Emine Münevver Akca Sanat Öyr 87.3 Passed
8 changes: 8 additions & 0 deletions Newdata2.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Delal Abdullatif Abzak Fizik 87.2 Failed
Atahan Adanır Bilgisayar Bil 47.0 Failed
Mükerrem Zeynep Ağca Fizik 56.2 Failed
Tutkum Ahmadı Asl Tıbb 58.0 Failed
Mügenur Ahmet Bilgisayar Müh 60.6 Failed
Lemi Akarçay Fizik 69.8 Failed
Rafi Akaş Matematik Müh 57.5 Failed
Nuhaydar Akbilmez Türkçe Bil Ara 56.8 Failed
65 changes: 65 additions & 0 deletions Proje(Data structure).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# for lists
list_methods=[]
for method in dir(list):
if method.startswith("__"): # python-un xususi funksiyalarini elave etmesin
continue
list_methods.append(method)

# for set
set_methods=[]
for method in dir(set):
if method.startswith("__"): # python-un xususi funksiyalarini elave etmesin
continue
set_methods.append(method)

# for tuple
tuple_methods=[]
for method in dir(tuple):
if method.startswith("__"): # python-un xususi funksiyalarini elave etmesin
continue
tuple_methods.append(method)

# for string
string_methods=[]
for method in dir(str):
if method.startswith("__"): # python-un xususi funksiyalarini elave etmesin
continue
string_methods.append(method)

# for dictionary
dict_methods=[]
for method in dir(dict):
if method.startswith("__"): # python-un xususi funksiyalarini elave etmesin
continue
dict_methods.append(method)

adlar=["List Methods","Set Methods","Tuple Methods","String Methods","Dict Methods"]
classes=[list_methods,set_methods,tuple_methods,string_methods,dict_methods]

max_len=0
for class1 in classes:
if len(class1)>=max_len: # en cox funksiyali methoda esasen cap etmek
max_len=len(class1)

with open("data.txt","w") as data:
for ad in adlar:
print(ad,end="") # title-lari cap etmek
print(" "*(30-len(ad)),end="")
data.write(ad)
data.write(" "*(30-len(ad)))

for i in range(max_len):
print()
data.write("\n")
for class1 in classes:
if i>=len(class1):
print("-------",end="")
print(" "*23,end="")
data.write("-------")
data.write(" "*23)
else:
print(class1[i],end="")
print(" "*(30-len(class1[i])),end="") # seliqeli gorunus ucun
data.write(class1[i])
data.write(" "*(30-len(class1[i])))

50 changes: 50 additions & 0 deletions Proje(Kecid bal).py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
with open("Mixdata.txt") as f:
with open("Newdata1.txt","w") as g:
with open("Newdata2.txt","w") as k:
inner=f.readlines()
m=0
for row in inner:
if m==0:
m+=1
continue
row=row.replace("\n","")
space_num=0
space_indexs=[]
index=0
for value in row:
if value==" ":
space_num+=space_num
space_indexs.append(index)
index+=1
ad_soyad=row[:space_indexs[0]]
soyad=ad_soyad.split("-")[-1]
ad=ad_soyad[:ad_soyad.index(soyad)-1].replace("-"," ")
points=row.split(" ")[-1]
points=points.split("/")
point1= int(points[0])
point2= int(points[1])
final= int(points[2])
ortalama=point1*0.3+point2*0.3+final*0.4
specialty=row[space_indexs[0]+1:space_indexs[len(space_indexs)-1]]
if ortalama>=70 and final>=70:
g.write(ad)
g.write(" "*(25-len(ad)))
g.write(soyad)
g.write(" "*(25-len(soyad)))
g.write(specialty)
g.write(" "*(25-len(specialty)))
g.write(str(round(ortalama,1)))
g.write(" "*21)
g.write("Passed")
g.write("\n")
else:
k.write(ad)
k.write(" " * (25 - len(ad)))
k.write(soyad)
k.write(" " * (25 - len(soyad)))
k.write(specialty)
k.write(" " * (25 - len(specialty)))
k.write(str(round(ortalama, 1)))
k.write(" " * 21)
k.write("Failed")
k.write("\n")
2 changes: 2 additions & 0 deletions Python1/Python2/Text3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
qwertyuiop[]\asdfghjkl;;['blfbfbdf;ssx
S\q]q360457945tf;sdlgdfhlf
Empty file added Python1/Text2.txt
Empty file.
Loading