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 A | |
| attr_accessor :x | |
| def initialize(x) | |
| @x = x | |
| end | |
| def foo | |
| self.x = 'foo' | |
| 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
| #Listedeki kelimenin sessiz harflerinden oluşan kısaltmasını üreten program: | |
| wordlist = ["ali", "ayse", "mehmet", "ahmet"] | |
| newwordlist = [] | |
| for i in range(len(wordlist)): | |
| c="" | |
| for x in wordlist[i]: | |
| if x not in "aeiouAEIOU": | |
| c += x | |
| newwordlist.append(c) |
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
| #Listedeki kelimenin sesli harflerini büyüten ve sessiz harflerini küçülten program: | |
| wordlist = ["ali", "ayse", "mehmet", "ahmet"] | |
| newwordlist = [] | |
| for i in range(len(wordlist)): | |
| l="" | |
| for x in wordlist[i]: | |
| if x in "aeiouAEIOU": | |
| l+=x.upper() | |
| if x not in "aeiouAEIOU0123456789": |
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
| #Listedeki kelimenin içerisindeki | |
| #harf sayısını | |
| #sayı sayısını | |
| #küçük harf sayısını | |
| #sesli harf sayısını | |
| #sessiz harf sayısını ekrana yazdıran program: | |
| wordlist = ["7ali", "1ayse", "3mehmet", "5ahmet"] | |
| countera = 0 | |
| countern = 0 | |
| counterl = 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
| #Listedeki kelimenin sesli harflerini yıldıza çevirme: | |
| wordlist = ["ali", "ayse", "mehmet", "ahmet"] | |
| newwordlist = [] | |
| for i in range(len(wordlist)): | |
| y = "" | |
| for x in wordlist[i]: | |
| if x in "aeiouAEIOU": | |
| y += '*' | |
| 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
| #Listedeki kelimenin ilk harfini büyütme: | |
| wordlist = ["ali", "ayse", "mehmet", "ahmet"] | |
| for i in range(len(wordlist)): | |
| wordlist[i]=wordlist[i].capitalize() | |
| print wordlist |
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
| #Listedeki kelimelerin ilk harfini büyütüp ekrana yazan program: | |
| wordlist = ["ali", "ayse", "mehmet", "ahmet"] | |
| for i in range(len(wordlist)): | |
| wordlist[i]=wordlist[i].capitalize() | |
| print wordlist |
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> | |
| int main(){ | |
| int a,b,c,i,d; | |
| printf("Lütfen Fibonacci seri sayısını giriniz:"); scanf("%d",&d); | |
| printf("Birinci sayı giriniz:"); scanf("%d",&a); | |
| printf("İkinci sayı giriniz:");scanf("%d",&b); | |
| for(i = 0; i <= d; i++){ | |
| printf("%d-",a); | |
| c = a+b; | |
| a = b; |
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> | |
| int main(){ | |
| int j, k; | |
| printf(" 1 2 3 4 5 6 7 8 9 10\n"); | |
| printf(" -----------------------------------------------------\n"); | |
| for (j=1; j<=10; j++) | |
| { | |
| printf("%5d|", j); | |
| for (k=1;k<=10;k++) | |
| printf("%5d", j*k); |
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> | |
| int main() { | |
| char str[50]; | |
| printf("Girdiğiniz metinde 'nano' kelimesinin olup olmadığını söyleyen program...\n "); | |
| printf("Lütfen metninizi giriniz:\n"); | |
| gets(str); | |
| int i = 0; | |
| int control = 0; |
NewerOlder