Skip to content

Instantly share code, notes, and snippets.

View nuryslyrt's full-sized avatar
🌟
Discover Stars!

Nur Gucu nuryslyrt

🌟
Discover Stars!
View GitHub Profile
#!/usr/bin/python
# -*- coding: utf-8 -*-
import turtle
t=turtle.Turtle()
t.shape("turtle")
t.speed(1)
t.pensize(4)
t.pen(fillcolor="brown",pencolor="white")
t.begin_fill()
#!/usr/bin/env python
#-*- coding: utf-8 -*-
isim = raw_input("lutfen isminizi giriniz:")
if isim == "ali":
numara = raw_input("hosgeldin numaranı gir:")
if numara == '019':
print 'hosgeldin'
elif numara <> '019':
print "Bu numara Ali'ye ait degil.cik sistemden."
@nuryslyrt
nuryslyrt / lab04_yoL_secici.py
Created March 21, 2011 01:42
4.foy odevi yoL secici fonksiyon
#!/usr/bin/env python
#-*- coding: utf-8 -*-
def yoL_secici(x, y, z):
if (x, y, z) == (0, 0, 0):
print "a : 0\nb : 0\nc : 0\d : 0\ne : 0\nf : 0\ng : 0"
elif (x, y, z) == (0, 0, 1):
print "a : 1\nb : 0\nc : 0\nd : 0\ne : 0\nf : 0\ng : 0"
elif (x, y, z) == (0, 1, 0):
print "a : 0\nb : 1\nc : 0\d : 0\ne : 0\nf : 0\ng : 0"
@nuryslyrt
nuryslyrt / lab04_mutlak_genel.py
Created March 25, 2011 03:31
mutlak değer fonksiyonum
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import math
def mutLak_geneL():
while True:
print "karmasik sayi icin 1\ntamsayilar icin 2\nondalikli sayilar icin 3\ncikmak icin 4 giriniz:"
secenek = raw_input("seciminiz:")
if secenek == '1':
x = int(raw_input("gercel kısmı giriniz:"))
y = int(raw_input("sanal kısmı giriniz:"))
import math
def daire_fonk(r):
cevre = 2*math.pi*r
alan = math.pi*r*r
if r > 0:
print 'dairenin cevresi',cevre,'birimdir.'
print 'dairenin alani',alan,'birim karedir.'
if r < 0:
print 'yaricap sifirdan kucuk olamaz'
@nuryslyrt
nuryslyrt / cookie import kodları
Created March 27, 2011 20:11
import edilmesi gereken kodlar
@nuryslyrt
nuryslyrt / cookie yazmak için gerekli kod
Created March 27, 2011 20:12
cookie yazmak için gerekli kod
@nuryslyrt
nuryslyrt / cookiedeyazdığına sonradan erişim
Created March 27, 2011 20:14
cookie de yazdığımız değere sonradan erişmek için
FacesContext context = FacesContext.getCurrentInstance();
String cookieName = null;
Cookie[] cookies = ((HttpServletRequest)context.getExternalContext().getRequest()).getCookies();
if(cookies != null && cookies.length > 0) {
for (int i = 0; i < cookies.length;i++) {
Cookie c = cookies[i];
...
}
}
@nuryslyrt
nuryslyrt / pythonda cookie
Created March 27, 2011 20:16
pythonda cookie
@nuryslyrt
nuryslyrt / myswap.c
Created November 19, 2011 18:49
stringi ters çeviriyoruz.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main(void)
{
myswap();
}
int myswap(void)