-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path20.py
39 lines (34 loc) · 1.4 KB
/
20.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
36
37
38
39
#When writing out mathematical equations for younger
#audiences, we usually want to use the traditional division
#and multiplication symbols, ÷ and ×, instead of slashes and
#asterisks. These keys aren't on the keyboard, though. So,
#let's write functions that will print them.
#
#First, write two functions: one called print_division_symbol
#and one called print_multiplication_symbol. The functions
#should do what their names suggest: print_division_symbol
#should print a division symbol, print_multiplication_symbol
#should print a multiplication symbol. You can copy the
#characters for those symbols from these directions.
#
#Then, after writing those two functions, call them in the
#same order: print_division_symbol, then
#print_multiplication_symbol. The output of your code should
#thus be ÷, then ×, each on their own line.
#
#Note that you don't need to worry about the end="" thing
#you saw in the video: just print the symbols on their own
#lines. Note also that if you receive a UnicodeEncodeError,
#try submitting your code instead of running it: that error
#happens sometimes, but only affects Run, not Submit.
#
#HINT: you're writing two functions. You don't want one to
#be inside the other.
#Write your two functions here!
def print_division_symbol():
print("÷")
def print_multiplication_symbol():
print("×")
#Call your two functions here!
print_division_symbol()
print_multiplication_symbol()