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 yol_bul(array,düğüm): | |
| if düğüm > len(array): | |
| exit("Verdiğiniz indiste bir değer bulunmamaktadır.") | |
| yol=[array[düğüm]] | |
| while düğüm>1: | |
| kök=array[düğüm//2] | |
| düğüm//=2 | |
| yol.append(kök) | |
| print("yol = ",yol) |
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
| #Şevki Utku MALKOÇOĞLU | |
| #13061086 | |
| #Soru 2 a şıkkı --> | |
| def solaltbul(a) : | |
| if len(a[1])>0 : | |
| a=a[1] | |
| return solaltbul(a) |
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
| #Şevki Utku MALKOÇOĞLU | |
| #13061086 | |
| #Soru 2 a şıkkı --> | |
| def solaltbul(a) : | |
| if len(a[1])>0 : | |
| a=a[1] | |
| return soldizi(a) |
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 Human | |
| attr_reader :first_name,:last_name,:age | |
| def initialize(first_name,last_name,age) | |
| @last_name,@age,@first_name=last_name,age,first_name | |
| end | |
| def full_name | |
| first_name+" "+last_name+" yas : #{age}" | |
| end | |
| end | |
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 Animal | |
| def selam | |
| p"Hayvanlardan merhaba" | |
| end | |
| end | |
| class Human < Animal | |
| def zeka | |
| p "Insanlar akillidir.Eren haric" | |
| end |
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
| public class Main { | |
| public static void YiyecekYazdir(Yiyecek y){ | |
| System.out.println(y.getIsım()+ " bir " + y.YiyecekTuru() + "dir."); | |
| } | |
| public static void main(String[] args) { | |
| Sebze s=new Sebze("Lahana","Kırmızı"); | |
| String yerSebze=s.getYer(); |
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 soldizi(a,sayac) : | |
| if len(a[1])>0 : | |
| a=a[1] | |
| sayac=sayac+1 | |
| return soldizi(a,sayac) | |
| return print(a[0]),print(sayac) | |
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(a,b): | |
| siraliDizi=[] | |
| i,j=0,0 | |
| while i<len(a) and j<len(b) : | |
| if a[i] < b[j] : | |
| siraliDizi.append(a[i]) | |
| i=i+1 | |
| else : | |
| siraliDizi.append(b[i]) |
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
| #Şevki Utku MALKOÇOĞLU | |
| #13061086 | |
| import random | |
| def Bul(n,dizi): | |
| if len(dizi)==n: | |
| return print(max(dizi)) | |
| pivot=random.choice(dizi) |
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
| #Veri yapıları ödevi | |
| #Şevki Utku Malkoçoğlu 13061086 | |
| #Kod Python 3.4.2 ye göre yazılmıştır... | |
| #Kodun en altında açıklama mevcuttur. | |
| def fib2dec(x): | |
| y, fib, i, sum ,a= len(x), [], 0, 0 ,0 | |
| while(i != y): | |
| if (i >= 1): | |
| fib.append(fib[i-1] + fib[i-2]) |