This file contains 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
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: ')) |
This file contains 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
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: |
This file contains 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
#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') |
This file contains 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
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: |
This file contains 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
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 |
This file contains 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
import sys | |
import os | |
def cls(): | |
os.system(['clear','cls'][os.name == 'nt']) | |
def alkani(): | |
n=int(input('sheiyvanet C -s indeqsi: ')) | |
n4 = n |