HandsOnExs Variables and DataType
HandsOnExs Variables and DataType
# Note : You can use Python's built-in functions, but importing external packages is NOT allowed
since they are beyond the scope of the current exercises
3. Find a quote from a famous person you admire. Store the famous person’s name in a variable called
famous_person. Then compose your message and store it in a new variable called msg3. Print your
message and the name of its author. Your output should look something like below, including the
quotation marks. i.e., :
Abraham Lincoln once said, “I walk slowly, but I never walk backward.”
Page | 1
4. Store your favorite number greater than 10 in a variable. By using that variable, answer below
questions.
(a) In a variable msg41, create a message that reveals your favorite number. Print that message.
(b) Evaluate whether your favorite number is the multiple of 6. In a variable msg42, make a message
to report the result and print it.
(c) Calculate the quotient of your favorite number and 4. In a variable msg43, make a message to
report the result and print it.
5. Let’s imagine that you have organized one-day spring trip with your four friends (Ben, Paul, Sarah,
and Jane). Store the name of the trip members in a list called name_members. By employing the list
variable, solve below questions.
(a) Print a message to individual friends. The text of each message should be the same as “Let’s meet
in the Seoul station at 9 o’clock tomorrow.” But each message should be personalized with the
person’s name.
(b) Update the list name_members by referring to Kakao-talk messages sent by a few of your friends
as below:
> From Paul : Sorry, I won’t be able to join in the trip.
> From Sarah : Hey! I will come over with my friends Cohen and Laura.
(c) Print the final number of the trip members.
Page | 2
6. The following Table 1 shows the annual mean precipitation for the years of 1991-2020 (i.e.,
climatological normal) at 8 meteorological stations in Korea.
Page | 3