i=0
while(i<9):
print i,
i+=1
stack = [3, 4, 5]
stack.append(6)
stack.pop()
a = int(raw_input("Type value of A (0 - 1): "))
b = int(raw_input("Type value of B (0 - 1): "))
c = int(raw_input("Type value of C (0 - 1): "))
print "H exodos einai f =", max((1-a)*b*(1-c),a*(1-b)*c)
def f(v):
if (v==1): return 1
elif (v%2==0): return f(v/2)+2
else: return f(v-1)+1
f(7)
x=0
while ((x<1) or (x>10)):
x=int(input("Give a positive number less than 10: "))
if (x<1):
print ("The number is not positive\n")
elif (x>9):
print("The number is not less than 10\n")
for c in range(x,10):
print c,
def mikos_odd(list):
pl=0
for i in range (len(list)):
if (list[i] % 2):
pl+=1
return (pl)
mikos_odd([1,3,6,8,10])
text =input("dose alfarithmitiko")
pl=0
pu=0
for i in range (len(text)):
if (text[i]>='a' and text[i]<='z'):
pl+=1
elif (text[i]>='A' and text[i]<='Z'):
pu+=1
print "Peza:",pl, "Kefalaia:", pu
list=[]
x=int(input("Give a positive number: "))
numbers = range(1,x+1)
for item in numbers:
list.append(item)
list
a=[]
for i in range(20):
a.append(int(raw_input("Type value: ")))
a.sort()
print a[0],a[1],a[2]
def search(P, num):
pos=-1
for i in range(len(P)):
if (P[i] == num):
pos = i
return (pos)
search([1,3,4,5,1],0)
def histogram(s):
s=str(s)
d = dict()
for c in s:
if c not in d:
d[c] = 1
else:
d[c] += 1
return d
histogram(12341)