<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Three-Way Decisions
if, elif, else
Step1:  S be carefull!
while Loop
Step2:  Queez
Once upon a time, there was king, who wanted lots of soldiers. So he commanded every couple in the country to have children, until their first dauter born. Then the family is banned from having any more child.
What will be the ratio of boy/girls in this country?
Step3:  Control Statments
break, continue and pass
Step4:  tuple
Step5:  Dictionaries
items get keys pop update values
Step6:  set
in, not in, len(), ==, !=, <=, <, |, &, -, ^
Step7:  List comprehention
Step8:  Generators
next()
<ASSISTANT_TASK:>
Python Code:
t=0
if t > 60:
    print('its very hot')
elif t > 50:
    print('its hot')
elif t > 40:
    print('its warm')
else:
    print('its cool')
t=55
if t > 40:
    print('its very hot')
elif t > 50:
    print('its hot')
elif t > 60:
    print('its warm')
else:
    print('its cool')
Explanation: Three-Way Decisions
if, elif, else
End of explanation
i=0
while i<10:
    print(i)
    i+=1
Explanation: S be carefull!
while Loop
End of explanation
from random import randint
children = 0
boy = 0
for i in range(10000):
    gender = randint(0,1) # boy=1, girl=0
    children += 1
    while gender != 0:
        boy += gender
        gender = randint(0,1)
        children += 1
print(boy/children)
Explanation: Queez
Once upon a time, there was king, who wanted lots of soldiers. So he commanded every couple in the country to have children, until their first dauter born. Then the family is banned from having any more child.
What will be the ratio of boy/girls in this country?
End of explanation
for i in range(10):
    print(i)
    if i == 5:
        break
for i in range(10):
    print(i)
    if i > 5:
        continue
    print("Hey")
def func():
    pass
func()
Explanation: Control Statments
break, continue and pass
End of explanation
t = (0,1,'test')
print(t)
t[0]=1
(1,)
Explanation: tuple
End of explanation
d = {}
d['name'] = 'Hamed'
d['family name'] = 'Seyed-allaei'
d[0]=12
d['a']=''
print(d)
print(d['name'])
print(d[0])
for i,j in d.items():
    print(i,j)
Explanation: Dictionaries
items get keys pop update values
End of explanation
a = set(['c', 'a','b','b'])
b = set(['c', 'd','e'])
print(a,b)
a | b
a & b
a - b
b - a
a ^ b
Explanation: set
in, not in, len(), ==, !=, <=, <, |, &, -, ^
End of explanation
l = []
for i in range(10):
    l.append(i*i)
print(l)
[i*i for i in range(10)]
{i:i**2 for i in range(10)}
Explanation: List comprehention
End of explanation
def myrange(n):
    i = 0
    while i < n:
        yield i
        yield i**2
        i+=1
        
x = myrange(10)
type(x)
next(x)
[i for i in myrange(10)]
for i in myrange(10):
    print(i)
Explanation: Generators
next()
End of explanation
<END_TASK>