+ 1

Why my code won't work as matrix

I write this code on my gnu/linux with python 2.7. https://code.sololearn.com/cC11z1dP8ZIR/?ref=app The problem is that: on my pc this make a matrix 8x8 with a diagonal of 'X', but in this app write only a colums. Is this a problem of app or is this a problem of python version?

14th Apr 2018, 12:31 PM
Curly Boy
Curly Boy - avatar
5 Answers
+ 3
14th Apr 2018, 12:49 PM
John Wells
John Wells - avatar
+ 7
I've only used this version so can't tell you that. I'm running the same version on my laptop.
14th Apr 2018, 12:56 PM
John Wells
John Wells - avatar
+ 3
SoloLearn's Python requires () on prints and ,end="" to stop newlines after outputing so: print (On, end="") else: print (Off, end="") print ()
14th Apr 2018, 12:37 PM
John Wells
John Wells - avatar
+ 1
Thanks very much. This SoloLearn Python have other syntaxes difference?
14th Apr 2018, 12:53 PM
Curly Boy
Curly Boy - avatar
0
This metod don't work if i don't define "end"
14th Apr 2018, 12:47 PM
Curly Boy
Curly Boy - avatar