+ 2

What is wrong with this program?

I tried this program both on my computer and SoloLearn and still got the correct output but I don't know why my teacher crossed out my whole program. I have also written what my program is about, so please help me out ASAP! Please tell if my program is wrong or my teacher!! This is the program- https://code.sololearn.com/cA97IH0FXHk2/?ref=app

5th Feb 2020, 4:24 PM
Divyansh Upadhyay
Divyansh Upadhyay - avatar
2 Respostas
+ 2
- You have not user input, is it ok ? - "print only the first word in reverse" "Harry" has 5 chars you are printing 13 chars with space before " yrraH" - your code is not easy to read because you are using too many variables with 1-2 characters long names. . After correct it, you need 2 strings and 1 variable declared in for.
6th Feb 2020, 8:39 AM
zemiak
+ 1
Thanks for all the help. After all, I talked to my teacher and spotted the problem-I only had to print the first one ie Harry only. Also, I had had space before yrraH which I didn't realize. Thanks for all the help blackwinter and denial!👍👍 In return, I am going to follow both of you!
7th Feb 2020, 4:39 PM
Divyansh Upadhyay
Divyansh Upadhyay - avatar