0

Ok give indentation correction. The and for the above pgm is in this link

https://code.sololearn.com/c0u72QYVVj43/?ref=app

13th Nov 2019, 5:23 PM
Monish
4 Respuestas
+ 1
At First : after a 'class String:' Everything in the class has to be indented. So shift every line 2 Times to the right. And you have also to intent after a "for" and after "if"
13th Nov 2019, 5:46 PM
Coding Cat
Coding Cat - avatar
+ 1
In line 21 and 25 the 'l' and 'L' has to be changed to 'u' and 'U'
13th Nov 2019, 5:59 PM
Coding Cat
Coding Cat - avatar
+ 1
Personally, I would prefer to take out all input and output Funktion from the class. And maybe a separat return for each Methode. In the main program it looks like this. instr = Input() s = String() s.setString(instr) upper = s.count_upper() lower = s.count_lower() . . print ('upper =', upper) and so on
13th Nov 2019, 6:20 PM
Coding Cat
Coding Cat - avatar
0
This one is NOT ready. But you can see how it works. And have a look at the Intention 😉 https://code.sololearn.com/cV8jFKSyH7Zk/?ref=app
13th Nov 2019, 7:07 PM
Coding Cat
Coding Cat - avatar