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} | |
| puts "Vize-Fİnal Hesaplama" | |
| puts "Vize Notunu Giriniz : " | |
| viz = gets.chomp.to_i | |
| puts "Final Notunuzu Giriniz : " | |
| fin = gets.chomp.to_i | |
| ort =viz*0.4 + fin*0.6 | |
| puts "Dönem sonu ortalamanız : #{ort}" |
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} | |
| puts "Notları Hesapla \n" | |
| puts "1.Arasınav Notunu Giriniz : " | |
| as1 = gets.chomp.to_i | |
| puts "2.Arasınav Notunuzu Giriniz : " | |
| as2 = gets.chomp.to_i | |
| puts "Final Notunuzu Giriniz : " | |
| fin = gets.chomp.to_i | |
| ort =as1*0.15 + as2*0.20 + fin*0.65 |
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} | |
| puts "Notları Hesapla \n" | |
| puts "1.Arasınav Notunu Giriniz : " | |
| as1 = gets.chomp.to_i | |
| puts "2.Arasınav Notunuzu Giriniz : " | |
| as2 = gets.chomp.to_i | |
| puts "Final Notunuzu Giriniz : " | |
| fin = gets.chomp.to_i | |
| ort =as1*0.15 + as2*0.20 + fin*0.65 |
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} | |
| puts "Sıcaklık değerini giriniz : " | |
| t = gets.chomp.to_i | |
| if t<0 | |
| puts "katı" | |
| elsif t<100 | |
| puts "sıvı" | |
| else | |
| puts "gaz" |
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
| puts "Sayi giriniz : " | |
| x=gets.chomp | |
| if x.to_f-x.to_i<0.5 | |
| puts x.to_i | |
| else | |
| puts x.to_i+1 | |
| 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
| #{Encoding:UTF-8} | |
| puts "Ortalama Hesaplama ve Geçti-Kaldı" | |
| puts "Vize notunuzu giriniz" | |
| viz=gets.chomp.to_f | |
| puts "Final notunuzu giriniz" | |
| fin=gets.chomp.to_f | |
| ort=(viz*0.4+fin*0.6) | |
| puts "Vize notunuz : #{viz}" | |
| puts "Final notunuz : #{fin}" |
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} | |
| puts "Ortalama Hesaplama ve Geçti-Kaldı" | |
| puts "Vize notunuzu giriniz" | |
| viz=gets.chomp.to_f | |
| puts "Final notunuzu giriniz" | |
| fin=gets.chomp.to_f | |
| ort=(viz*0.4+fin*0.6) | |
| puts "Vize notunuz : #{viz}" | |
| puts "Final notunuz : #{fin}" |
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} | |
| puts "Ondalık sayı oluşturma" | |
| puts "Çevirilecek sayının tamsayı kısmını giriniz: " | |
| tam=gets.chomp.to_s | |
| puts "Çevirilecek sayının ondalık kısmını giriniz: " | |
| on=gets.chomp.to_s | |
| #Kullanıcıdan aldığımız sayı değerlerini stringe çevirdik | |
| birlestir=tam + "." + on | |
| #string değerleri arasına . işareti koyarak birleştirdik |
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} | |
| puts "Metin yazınız" | |
| i=gets.chomp.to_s #eğer tüm metni küçük harfe çevirerek bakmak istersek bu satira i=gets.chomp.downcase.to_s yazabiliriz... | |
| puts "Yazdığınız metin #{i} \n Bu metinde ;" | |
| dizi=["a","e","i","ı","ü","u","o","ö"] #downcase kullanmayacaklar bu diziye "A","E","I","İ","U","Ü"."O","Ö" eklesinler. | |
| #downcase ile metni küçülttüğümüzde I harfi i oluyor İ harfini küçültemiyor. | |
| dizi.each do |x=dizi.pop| | |
| if i[x] | |
| print x," ", "harfi var \n" |
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 | |
| puts "Metin yazınız" | |
| x=gets.chomp.to_s | |
| z=x.gsub(/[aeıioöuü]/,"") #Metindeki sesli harfleri çıkarır | |
| s=(x.length)-(z.length) #Metnin önceki halindeki karakter sayısından sesli harfler atılmış karakter sayısını çıkarır. | |
| puts s , "tane sesli harf vardır" #Sesli harflerin sayısı ekrana yazılır |
OlderNewer