I don’t know why, I can’t make a thread in python forum the “New topic” button isnt active for me.
Hello;
I try to learn python; i use 2 website Codecademy and Sololearn.
why do when I put the code from Codecademy exercise into the Sololearn code playground, nothing work ?
exemple :
EXERCICE 1
my_string = "stringgggg"
print len(my_string)
print my_string.upper()
- Codecademy result :
10
STRINGGGGG
- Sololearn result :
File "..\Playground\", line 2
print len(my_string)
^
SyntaxError: invalid syntax
EXERCICE 2
name = raw_input("What is your name? ")
quest = raw_input("What is your quest? ")
color = raw_input("What is your favorite color? ")
print "Ah, so your name is %s , your quest is %s , "
“and your favorite color is %s .” % (name, quest, color)
- Codecademy result :
-console ask the 3 question then print the string wit the answer as “%s” -
- Sololearn result :
File "..\Playground\", line 5
print "Ah, so your name is %s , your quest is %s , " \
^
SyntaxError: Missing parentheses in call to 'print'
code playground : https://code.sololearn.com/cphV6pA1w9X5/#
What’s wrong ? is the code from codecademy not “real python” code ?