Dont' works the code


#1

This is the code:

nombre = raw_input("¿Cuál es tu nombre?")
mision = raw_input("¿Cuál es tu misión?")
color = raw_input("¿Cuál es tu color favorito?")

print "Ah, asi que tu nombre es %s, tu mision es %s, y tu color favorito es %s." % (nombre, mision, color)

and this the answer:

Traceback (most recent call last):
File "python", line 1, in
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)

https://www.codecademy.com/es/courses/python-beginner-es-uW8F7/3/4?curriculum_id=50fc7aab5fab3aa9c2002444

¡Uy! Probá otra vez. Parece que los datos de salida no son correctos.

Traceback (most recent call last):
File "python", line 1, in
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)


nombre = raw_input("¿Cuál es tu nombre?")
mision = raw_input("¿Cuál es tu misión?")
color = raw_input("¿Cuál es tu color favorito?")

print "Ah, asi que tu nombre es %s, tu mision es %s, y tu color favorito es %s." % (nombre, mision, color)


#2

what are you using? spanish? That is not that easy:


#3

Yes, spanish, I'm doing the spanish version. I'm from Spain, and the exercices are translate to spanish.

Ah, thanks, I'll see the link.


#4

yea, but strings in python need special treatment in order to work with spanish characters, see the link, hope that helps :slight_smile:


#5

well, I replace the firts code for this one:

nombre = raw_input("Cual es tu nombre?")
mision = raw_input("Cual es tu mision?")
color = raw_input("Cual es tu color favorito?")

print "Ah, asi que tu nombre es %s, tu mision es %s, y tu color favorito es %s." % (nombre, mision, color)

without the spanishs characters á, ñ, ó. Simple, and still menaning the same.

Thanks for the idea.


#6

if i run your code now, all is good. Maybe refresh the page?


#7

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