"Create You Own" what's the error?


c = [2,6,10,7]
for n in c:
    if n % 2 == 0:
        print "%s è pari!" %n
    print "%s è dispar!" %n

it returns error: Traceback (most recent call last):
File "python", line 4, in
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

can't figure why


the è is not a valid character it seems, just use e


wow thx!!

now... how can we print these kind of characters?


i tried it on repl.it, there it works

honest answer: I don't know, i am afraid you will have to google that


possibly repl.it uses python 3?
the fact codecademy needs "raw_input" makes me think it still uses python 2

but i've just started with python so.. buh!

thx again!


repl has both

yea, codecademy still uses python2

once you learn python, its enough to learn the differences


Hi I'm stuck on the this exercise. I wrote a program to take 5 languages and sort them into front and backend. It prints all languages as backend so there is a problem with my if statement.....

languages = ['html', 'css', 'javascript', 'python', 'mysql']

for lan in languages:
if x == 'html' or x == 'css' or x == 'javascript':
print lan + " - This is front end stuff."
if x == 'python' or x == 'mysql':
print lan + " - This is backend stuff."

The language sprint correctly but python and mysql doesnt say its backend. how do i fix this please?
Can someone pls tell me what ive done wrong?


Sorry its prints all languages as front end.


where does x come from? lan contain your languages, so you check if lan equals css and so on


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.