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 strdegis(string,indis,ch): | |
liste=[] | |
ystr="" | |
for i in range(len(string)): | |
liste+=string[i] | |
liste[indis:indis]=str(ch) | |
for i in range(len(liste)): | |
ystr+=liste[i] | |
print ystr | |
#ÇALIŞMA SORUSU :VERİLEN BİR STRİNGİ LİSTEYE, |
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
package ogrenci; | |
import java.util.*; | |
public class IlkOyun { | |
private static Scanner games; | |
public static void main(String args[]) | |
{ | |
Random rastgele = new Random(); // rastgele sayi üretmek için bir nesne oluşturur | |
int sayi = rastgele.nextInt(1000); |
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
package ogrenci; | |
import java.util.*; | |
public class IlkOyun{ | |
private static Scanner games; | |
private static Scanner sayi_al; | |
private static Scanner al; | |
public static void main(String args[]) { | |
al = new Scanner(System.in); |
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 sayiOyunu() | |
rnd , hamleS = rand(100) , 0; | |
while true | |
hamleS+=1 | |
puts " Sayiyi Tahmin ediniz:" | |
tahmin = gets.to_i | |
if tahmin == rnd | |
puts "Tebrikler Dogru tahmin\n#{hamleS} Hamlede Kazandın!" | |
break | |
elsif (tahmin > rnd) |
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 sayiOyunu() | |
rnd=54 | |
puts " Sayiyi Tahmin ediniz:" | |
tahmin = gets.to_i | |
if tahmin == rnd | |
puts "Tebrikler Dogru tahmin!" | |
elsif (tahmin >rnd) | |
puts "Tahminin Sayidan Buyuk" else puts "Tahminin Sayidan Kucuk" | |
else | |
puts "tahmininiz sayidan kucuk" |
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
# encoding: utf-8 | |
class Base | |
# Tüm sıkıştırma biçimlerinde ortak olan unsurları | |
# toplayacağınız baz sınıf | |
attr_reader :file | |
def initialize (deger) | |
@file = deger | |
end | |
def fonk | |
puts " #{file} aciliyor " |
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 Bagliliste: | |
def __init__(self,size): | |
self.data=[None]*size | |
def ekleme(self,item,data): | |
hashdeger=self.hashfon(item,len(self.data)) | |
if self.data[hashdeger]==None: | |
self.data[hashdeger]=data |
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 HashTable: | |
def __init__(self,size): | |
self.slots=[None]*size | |
self.data=[None]*size | |
def store(self,item,data): | |
#hashvalue=self.hashfunction(item,len(self.slots)) | |
hashvalue=self.mid_square(item,len(self.slots)) | |
if self.slots[hashvalue]==None: |
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 HashTableCS: | |
def __init__(self,size): | |
self.slots=[None]*size | |
def store(self,key,value): | |
hashvalue=self.hashfunction(key,len(self.slots)) | |
if self.slots[hashvalue]==None: |
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 listeYarilama(alist,atlama): | |
altliste=[] | |
for i in range (0,len(alist),atlama+1): | |
altliste.append(alist[i]) | |
return altliste | |
def listeYarilama_enbuyugubul(alist,atlama): | |
temp=alist[0] | |
for i in range (0,len(alist),atlama+1): |
OlderNewer