+ 6

Why Indentions on some codes are not working properly on PC in SoloLearn?

There are some codes that when I run into my phone in code playground, it works properly and fine. But when I use Desktop, the indention are different. For example when I draw an Equilateral Triangle using codes(which needs proper indention), when it runs in SoloLearn desktop, it becomes a Right Triangle. Is there any way to fix this? If there are similar threads that I may have missed, please send and thank you. Thanks!!

13th Dec 2020, 2:33 AM
noteve
noteve - avatar
15 Answers
+ 3
Writing in this because SL showing me error when I try to post actual answer... wth https://code.sololearn.com/W9MDAIvJ0n96/?ref=app
13th Dec 2020, 3:13 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 5
Speculatively, the difference in screen resolution may alter how output is rendered on screen (assuming output on console screen). If both output (in SoloLearn and PC) were rendered using monospace fonts, I guess output might look similar. I've also experienced my code outputs, which looks well aligned in my phone, looks different in my friend's phone. And guess what? we both use SoloLearn app on Android. So maybe even different phone (with different O/S version or app version) may also give different output. WARNING: All these are just my speculative opinion.
13th Dec 2020, 3:07 AM
Ipang
+ 4
《 Nicko12 》 please give a code example
13th Dec 2020, 3:00 AM
Krish
Krish - avatar
+ 4
Krish Except for monospace fonts, any character printed using a certain font will have different width. This can affect how output looks like on screen.
13th Dec 2020, 3:14 AM
Ipang
+ 3
Same issue for me.
13th Dec 2020, 2:44 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 3
Ipang I think that resolution doesn't matter because every screen will treat spaces also. i.e. if there are 4 spaces then it will be 4 only but it can take less or more space. For example - " =)" Or " =)" The art should look same
13th Dec 2020, 3:11 AM
Krish
Krish - avatar
+ 3
《 Nicko12 》 try to change space with unicode \u0020 I think this would work Ps not sure
13th Dec 2020, 3:20 AM
Krish
Krish - avatar
+ 3
Its best to download a Different text editor for programming and then work on it so you can learn the concpets and apply in that text editor and save the files in your storage so you can handle these files properly also
13th Dec 2020, 8:08 AM
Sayyam Jain
Sayyam Jain - avatar
+ 2
I experience something like this: Original output: /\ /==\ Output on desktop: /\ /==\
13th Dec 2020, 3:13 AM
noteve
noteve - avatar
+ 2
《 Nicko12 》 glad to know that you figured it out
13th Dec 2020, 4:01 AM
Krish
Krish - avatar
+ 1
《 Nicko12 》 i can't see any problem there it works fine for me
13th Dec 2020, 3:04 AM
Krish
Krish - avatar
+ 1
I get it now, Thanks to Everyone!!
13th Dec 2020, 3:51 AM
noteve
noteve - avatar
13th Dec 2020, 3:01 AM
noteve
noteve - avatar
0
Krish OK, Thank you for your testing. Maybe, it has something to do about my device.
13th Dec 2020, 3:08 AM
noteve
noteve - avatar