forked from VelezReyes/first-quiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquestion1.py
35 lines (29 loc) · 1.28 KB
/
question1.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
################################################################################
# ____ __ _ ___
# / __ \ __ __ ___ _____ / /_ (_) ____ ____ < /
# / / / / / / / / / _ \ / ___/ / __/ / / / __ \ / __ \ / /
# / /_/ / / /_/ / / __/ (__ ) / /_ / / / /_/ / / / / / / /
# \___\_\ \__,_/ \___/ /____/ \__/ /_/ \____/ /_/ /_/ /_/
#
# Question 1
################################################################################
#
# Instructions:
# The two functions below are used to tell the weather. They have some bugs that
# need to be fixed. The test suite in `question1_test.py` will verify the output.
# Read the test suite to know the values that these functions should return.
def get_city_temperature(city):
if city == "Quito":
return 22
if city == "Sao Paulo":
return 17
if city == "San Francisco":
return 16
def get_city_weather(city):
sky_condition = None
if city == "Sao Paulo":
sky_condition = "cloudy"
elif city == "New York":
sky_condition = "rainy"
temperature = get_city_temperature(city)
return str(temperature) + " degrees and " + sky_condition