Skip to content

Instantly share code, notes, and snippets.

View savolla's full-sized avatar

Oleksiy Nehlyadyuk savolla

View GitHub Profile
@savolla
savolla / test1.py
Created February 25, 2017 21:46
not a big deal..
#functions
def height():
print("please enter your height in cm format")
height = int(input())
if height < 150:
print("too short..")
elif height > 180:
def character_creation():
print("""
please select your class:
type "w" for witch
type "s" for shadow
type "r" for ranger
type "d" for duelist
type "m" for marauder
type "t" for termplar
@savolla
savolla / fialed_pi.py
Last active February 28, 2017 00:25
I wanted to greate pi digit generator but I failed......... I tryed to divide 22/7 but getting same number every time..
b = 10
while True:
a = b%7
if b > 7:
b = int(str(a) + str(0))
c = b//7
else:
c = b//7
print(c)
@savolla
savolla / tryhard_calculator.py
Created March 1, 2017 00:32
this program is very very vveeeerryyy bad... don't even run it
'''
tryhard bir program olduğu için sadece
tek basamaklı sayılarla işlem yapabilme
yeteneğine sahip...
'''
rakam_listesi = [0,1,2,3,4,5,6,7,8,9]
def toplama(a,b):
c = a + b
@savolla
savolla / sys_module_first_look_lol.py
Created March 5, 2017 11:19
not a big deal again and don't laugh.
import sys as os
version = os.version
if "3" in version:
print("okay this is not 2.x version of python. We are cool.")
elif version[1] > 3:
print("wow man! that you gotta upgrade me asap!")
else:
print("we are living in 2017 m9")
@savolla
savolla / just_lines_and_slashes_dance.py
Created March 5, 2017 12:12
this is very important program. It saves the world from aliens!
def ascendant():
x = "\\"
c = 1
for i in range(0,20):
print(x*c)
c += 1
def line():
print("-"*20)
@savolla
savolla / data_control_eval_result.py
Created March 5, 2017 14:57
in this gist, I wanted to make some serious things. there is a function called eval() in python. With this function we can enter actual and working python commands in input() function which is going to be executed after pressing enter. so okay as you know there are bunch of hackers! and they might crack our very important program with this eval(…
cluster = "0123456789-+/*"
operation = input("please do your math operation\n: ")
for i in operation:
if i not in cluster:
print("please work with numbers mr. hacker!")
break
@savolla
savolla / that_AI_thou.py
Last active March 5, 2017 15:06
okay now this program has a very cruel language. cruelererer AI, better chance to pass turing test if you know what I mean..
def passggg():
password = input("password: ")
l = len(password)
if not password:
print("WHERE IS YOUR GODDAMN PASSWORD!?!")
print("now be a good boy and enter your password.")
passggg()
@savolla
savolla / Noob_math.py
Created March 7, 2017 20:24
I finally made something useful. This program takes power of numbers 1 to 10. Not very useful but I wrote this in 5 mins :OOO
import math
l = []
for i in range(1,11):
i = i**2
l.append(i)
i = int(math.sqrt(4))
i += 1
print(l)
#savolla and his playground.
#whats the differance between the first and second lines?
#this program tells us the answer
#let's say we want to see not repetitive characters
first_line = "hdfjsgkfffgklf25kso3fgşslkdfjdsşlkydfhfgjfurıurrljhpw"
second_line = "rğıyooooooooncxbnb909brmrgpoıunrnpn4yyyyyyyyyyckdlsd"
difference = ""