This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deneme(): | |
print ("denemeeee") | |
deneme |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def birlestir(dizi1,dizi2): | |
adizi=[] | |
i=0 | |
j=0 | |
ortakeleman=[] | |
while i<len(dizi1) and j<len(dizi2): | |
if dizi1[i]<dizi2[j]: | |
adizi.append(dizi1[i]) | |
i=i+1 | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ucbasamak(sayi): | |
yuzlerbasamagi=int(sayi/100) | |
onlarbasamagi=int((sayi/10)%10) | |
birlerbasamagi=(sayi%100)%10 | |
print ("Girdiğiniz sayı :",yuzlerbasamagi,onlarbasamagi,birlerbasamagi) | |
tmpdizi=[yuzlerbasamagi,onlarbasamagi,birlerbasamagi] #basamakları diziye atıyor. | |
tmpdizi.sort() #dizi elemanlarını küçükten büyüğe sıralıyor. | |
if tmpdizi[0]==0: | |
tmpdizi[0],tmpdizi[1]=tmpdizi[1],tmpdizi[0] #yüzler basamağı 0 ise onu onlar basamağıyla değişiyor. | |
if tmpdizi[1]==0 and tmpdizi[0]==0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <pthread.h> | |
#define NUMBER_OF_THREADS 10 | |
void * | |
print_hello_world(void *tid) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Nokta çarpım seri (klasik) gerçekleme */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
static int *vector_a; | |
static int *vector_b; | |
static long dot_product; | |
#define VECTOR_LENGTH 100000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Özgür KARAÇAM | |
#14060824 | |
def obeb(a,b): | |
ebob=1 | |
bolen=2 | |
while bolen<=a and bolen<=b: | |
if(a%bolen==0 and b%bolen==0): | |
ebob=bolen | |
bolen=bolen+1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hesapla(kisakenar,uzunkenar): | |
alan=0 | |
karesayisi=1 | |
karealani=0 | |
kalanalan=0 | |
while True: | |
alan=kisakenar*uzunkenar | |
karealani=kisakenar*kisakenar | |
kalanalan=alan-karealani | |
uzunkenar=kalanalan/kisakenar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hesapla(nlist): | |
i=1 | |
liste=[] | |
while i<len(nlist): | |
ort=(nlist[i]+nlist[i-1])/2 | |
liste.append(ort) | |
i=i+1 | |
if (len(nlist)==1): | |
return nlist | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Kesir: | |
def __init__(self,a,b): | |
self.pay=a | |
self.payda=b | |
def __str__(self): | |
return str(self.pay)+"/"+str(self.payda) | |
def __add__(self,o): | |
tpay=(self.pay*o.payda)+(self.payda*o.pay) | |
tpayda=self.payda*o.payda | |
return (Kesir(tpay,tpayda).sadelestir()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hextodecimal(A): | |
sayi=0 | |
A=A[::-1] | |
for i in range(len(A)): | |
if A[i]=="A": | |
sayi=sayi+(10*(16**i)) | |
elif A[i]=="B": | |
sayi=sayi+(11*(16**i)) | |
elif A[i]=="C": | |
sayi=sayi+(12*(16**i)) |
OlderNewer