lesson_9_ex_1_17_18

s = 0 
k = ''
for i in range (9,0,-1):
    k = k + str(i)
    s = s + int(k)
    print 'the last added number is ' , k
print s

vowels = 'aeiough'
s = ''
x = raw_input('give a string')
for i in x:
    if i in vowels:
       s = s+i
print s 

excluded_charachters = 'stST'
s = ''
x=raw_input('give a string')
for i in x:
    if i not in excluded_charachters:
       s = s+i
print s         

import random
l = [] 
for i in range(0 , 25):
    l.append(random.randint(0,100))
print l
l.sort()
print l 
print 'the 3 smallest numbers are : ', l[0:3]
l.reverse()
print 'the 3 smallest numbers are : ', l[0:3]

 

Posted in Uncategorized