Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random as r
- s=0
- k=0
- while k<=12:
- a=r.randrange(100)
- s+=a
- k+=1
- print('периметр:',s)
- s=0
- k=0
- while k<=10:
- a=r.randrange(100)
- if (a%10)==0:
- s+=a
- k+=1
- print('сумма:',s)
- s=0
- k=0
- while k<=12:
- a=r.randint(140,200)
- if a<165:
- a=1
- s+=a
- k+=1
- print('кол-во чел ниже 165:',s)
- s=0
- k=0
- while k<=30:
- a=r.randint(1,5)
- if a==5:
- a=1
- s+=a
- k+=1
- print('кол-во 5:',s)
- s=0
- k=0
- while k<=30:
- a=r.randrange(1000)
- if (k%2)==0:
- s+=a
- k+=1
- print('кол-во осадков:',s,'мм')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement