Skip to content

Instantly share code, notes, and snippets.

View oguzcan-yavuz's full-sized avatar

Oguzcan Yavuz oguzcan-yavuz

View GitHub Profile
@oguzcan-yavuz
oguzcan-yavuz / vize.py
Last active November 1, 2017 06:51
gecen seneden bir sonraki senenin vizesinin cozumleri
# 1
def random_yuz_sayi():
import random
a, b = [], []
[(a if i % 2 == 0 else b).append(i) for i in random.sample(xrange(0, 500), 100)]
print("A listesindeki elemanlar toplami: %d" % (sum(a)))
print("B listesindeki elemanlar toplami: %d" % (sum(b)))
random_yuz_sayi()
def gcd(a, b):
"""Calculate the Greatest Common Divisor of a and b.
Unless b==0, the result will have the same sign as b (so that when
b is divided by it, the result comes out positive).
"""
while b:
a, b = b, a%b
return a
# Kod kismi
class StatisticalSummary(object):
def __init__(self, seq):
self.seq = seq
def five_figure_summary(self, precision=None):
return ("N", "extreme_lower", "extreme_upper", "lower_quartile", "median", "upper_quartile")
# Test kismi
*** 1-100
11
22
33
44
55
66
77
88