Skip to content

Instantly share code, notes, and snippets.

@MishoG
MishoG / organic.py
Last active August 29, 2015 14:10
ალკანის ალკენის და ალკინის წვის რეაქციები.
import sys
import os
def cls():
os.system(['clear','cls'][os.name == 'nt'])
def alkani():
n=int(input('sheiyvanet C -s indeqsi: '))
n4 = n
import sys
import os
def cls():
os.system(['clear','cls'][os.name == 'nt'])
def kvadrati():
a = int(raw_input('sheiyvenet gverdi : '))
print 'perimetri = ' , 4*a , 'fartobi = ' , a**2
@MishoG
MishoG / guess_number.py
Created November 24, 2014 17:15
რიცხვის გამოცნობა
import random
number = random.randint(1, 50)
attempts = 5
for attempt in range(attempts):
guess = int(input('chaweret ricxvi 1 dan 50 mde: '))
if guess > number:
print ('tqveni ricxvi dzalian didia' )
elif guess < number:
print ('tqveni ricxvi dzalian pataraa')
else:
@MishoG
MishoG / amocana2.py
Created November 22, 2014 09:15
Find the sum of all the multiples of 3 or 5 below 1000.
#Find the sum of all the multiples of 3 or 5 below 1000.
number = sum([num for num in range(1000) if num%3 == 0 or num%5 == 0])
print number
raw_input('enter')
@MishoG
MishoG / amocana.py
Created November 21, 2014 12:38
ამოცანა 1
a = int(input('sheiyvanet ricxvi: '))
b = int(input('sheiyvanet ricxvi: '))
c = int(input('sheiyvanet ricxvi: '))
numbers = [a, b, c]
print ("uaryopiti ricxvebis raodenobaa: ")
print sum(1 for number in numbers if number < 0)
print 'shedegi :'
if a > 0:
print 2 * a
elif a < 0:
@MishoG
MishoG / quadratic.py
Last active August 29, 2015 14:10
კვადრატული განტოლების ამოხსნა / solving quadratic equation
import math
import os
import sys
def cls():
os.system(['clear','cls'][os.name == 'nt'])
def quadratic():
a = int(input('enter a: '))
b = int(input('enter b: '))