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 87fcc73

Browse files
Add files via upload
1 parent 5fe5265 commit 87fcc73

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed

‎metin.txt‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
edsdf
2+
dfds
3+
fg
4+
gfg
5+
hg
6+
hggfh
7+
gfghg
8+
fh
9+
gfghgg
10+
gfgf
11+
f
12+
hgh
13+
eqfr

‎ornekler_3.py‎

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
"""
2+
Soru 1
3+
Kendisine gönderilen sayılardan sadece palindrom olanları toplayan, diğerlerini de bu toplamdan çıkaran ve geri döndüren fonkisyonu yaz.
4+
palindrom = 909 , 888, 121 ...
5+
"""
6+
7+
def palindrom(*dram):
8+
total = fark = 0
9+
for sayı in dram:
10+
if str(sayı) == str(sayı)[::-1]:
11+
total += sayı
12+
else:
13+
total -= sayı
14+
return total - fark
15+
16+
print(palindrom(10, 101, 55, 40, 9001))
17+
18+
""""""""""""""""""""""""""""""""""""""""""""
19+
20+
class sınıf:
21+
e = 5
22+
d = "qwew"
23+
f = [2, 4, 6]
24+
25+
def write(self):
26+
k = 120
27+
print(k, self.k)
28+
29+
def write2(self,y):
30+
self.write()
31+
print(y)
32+
33+
nesne = sınıf()
34+
nesne.write()
35+
nesne.write2("fwefreq") # self i görmezden geliyoruz.
36+
37+
38+
obje = sınıf()
39+
print(obje.e)
40+
obje.e = 989
41+
print(obje.e)
42+
43+
def Palamut():{print("asdsefd")}
44+
45+
Palamut()
46+
47+
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
48+
49+
class qwerty:
50+
yazı = ""
51+
def __init__(self, b):
52+
self.yazı = b
53+
54+
def __del__(self):
55+
print("sil")
56+
57+
def __str__(self):
58+
return "yazdırılan : " + self.yazı
59+
60+
nesneee = qwerty("Ali")
61+
print(nesneee.metin)
62+
63+
qw = qwerty("CIVA")
64+
print(qw)
65+
66+
""""""""""""""""""""""""""""""""
67+
68+
def num(c, d):
69+
return c + d
70+
71+
def multiply(c , d):
72+
return c * d
73+
74+
75+
w = 4
76+
s = "wefı"
77+
r = [0, 5 ,6]
78+
""""""""""""""""""""""""""""""""""""""""""""""""""""""
79+
import ast
80+
from cmath import e
81+
import ornekler_2 as orn
82+
83+
from ornekler_2 import num
84+
85+
print(orn.num(5, 7))
86+
print(orn.e)
87+
88+
print(num(1, 5))
89+
90+
print(orn.e)
91+
92+
#####################################################
93+
94+
a = "wer"
95+
try:
96+
h = 9 + a
97+
except:
98+
print("int and string")
99+
100+
#############################
101+
102+
from termcolor2 import termcolor
103+
104+
print(qw("hi").red.on_white.blink.underline.dark)
105+
106+
""""""""""""""""""""""""""""""""""""""""""""""""
107+
108+
dosya = open("metin.txt", "v")
109+
110+
for satır in dosya:
111+
print(satır[:-1])
112+
113+
gerg = open("metin.txt", "r")
114+
print("villages", file=gerg)
115+
116+
gerg.close()
117+

‎python_python.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
gerg = open("ornekler.txt", "r")
2+
print(print("efsane py"), file=gerg)
3+
gerg.close()
4+
5+
gerg = open("ornekler.txt", "r")
6+
satır = gerg.readline()
7+
eval(satır)

0 commit comments

Comments
(0)

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