Oct-27-2019, 10:50 AM
Hi, I have just started learning to program and I am using Python 3. I am learning from a book "Python in Easy Steps" by Mike McGrath all was going well until I reached chapter 2 perfroming operations on page 27 doing Arithmetic it asks you to enter the following code:
SyntaxError: encoding problem: ascii
or it comes up with a UTF-8 error out of range 128
How do I get the priogram to print the obelus division sign?
I have tried reading about Unicode but there are so many pages about this and non of the ideas appear to be working!
How do I print the extended ASCII code set characters in Python 3?
Please help, I am as confused as hell!
Many thanks
Frank
a = 8
b = 2
print('Addition:\t',a,'+',b,'=',a+b)
print('Subtraction:\t',a,'-',b,'=',a-b)
print('Multipication:\t',a,'x',b,'=',a*b)
print('Division:\t',a,'÷',b,'=',a/b)
print('Floor Division:\t',a,'÷',b,'=',a/b)
print('Modulus:\t',a,'%',b,'=',a%b)
print('Exponent:\t',a,'²=',a**b,sep = '') File "arithmetic.py", line 2SyntaxError: encoding problem: ascii
or it comes up with a UTF-8 error out of range 128
How do I get the priogram to print the obelus division sign?
I have tried reading about Unicode but there are so many pages about this and non of the ideas appear to be working!
How do I print the extended ASCII code set characters in Python 3?
Please help, I am as confused as hell!
Many thanks
Frank

![[Image: Wn7asS.jpg]](https://imagizer.imageshack.com/v2/640x480q90/922/Wn7asS.jpg)