TORONTO KIDS COMPUTER CLUB | Wednesday Friday 15:00 Python Practice 20.08.05.
18088

# Wednesday Friday 15:00 Python Practice 20.08.05.

## 06 Aug Wednesday Friday 15:00 Python Practice 20.08.05.

Question 1:

A soccer team is looking for girls from ages 10 to 12 to play on their team. Write a program to ask the user’s age and if male or female (using “m” or “f”). Display a message indicating whether the person is eligible to play on the team.

```Sample Input 1:
Age: 10
Gender: f

Sample Output 1:
Welcome to the team!```

```Sample Input 2:
Age: 10
Gender: m

Sample Output 2:
You are not allowed to play!```

Question 2:
Continue coding the program we did in the class, so the program will tell you whether you can pay in the zone:

 height color zone if<90 green 1 elif<105 yellow 1, 2 elif <115 red 2,3,4 elif <130 pink 3,4 elif <150 blue 4 else white 4,5

Please continue coding the following program:

```h = int(input('Height:'))
if h < 90:
c = 'green'
elif h < 105:
c = 'yellow'
elif h < 115:
c = 'red'
elif h < 130:
c = 'pink'
elif h < 150:
c = 'blue'
else:
c = 'white'

z = int(input('Zone to play: '))
if z == 1 and (c == 'green' or c == 'yellow'):
print('You can play in zone 1')```
• ##### Ethan Li
Posted at 12:58h, 07 August Reply

h=int(input(‘Height: ‘))
if h<90:
c='green'
elif h<105:
c='yellow'
elif h<115:
c='red'
elif h<130:
c='pink'
elif h= 10 and age <=12 and (gender== 'g' or gender == 'girl' or gender == 'female'):
print('Welcome to the team')
else:
print( 'You are not allowed to play!')

• ##### Jesse Shi
Posted at 17:25h, 07 August Reply

age = input(‘age: ‘)
if age == ’10’ or age == ’11’ or age == ’12’:
print(‘OK? Is that so?’)
else:
Gender = input(‘Gender: ‘)
if Gender == ‘f’ or Gender == ‘female’:
print(‘Welcome to my stupid team, heehee…’)
else:
print(‘Sorry, please enter ctrl + alt + delet and prese enter to leave a messeage…’)

• ##### Jesse Shi
Posted at 17:45h, 07 August Reply

h = int(input(‘Height:’))
if h < 90:
c = 'green'
elif h < 105:
c = 'yellow'
elif h < 115:
c = 'red'
elif h < 130:
c = 'pink'
elif h < 150:
c = 'blue'
else:
c = 'white'