why this code is not running on sololearn | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why this code is not running on sololearn

from code coach problem. https://code.sololearn.com/cPK5OeW6nA85/?ref=app

15th Sep 2020, 6:15 AM
Vision
Vision - avatar
8 Answers
+ 3
Is it working in the IDE? Ig, there's some problem in your code 🤔 (couldn't understand tho)
15th Sep 2020, 6:48 AM
Namit Jain
Namit Jain - avatar
+ 2
Can you guys please run the same cade in code coach problem.there you find the exact trackback errors. you can find the quiz in medium level section.
16th Sep 2020, 1:35 AM
Vision
Vision - avatar
+ 2
import datetime as d string =input().replace(",", " ") if string[0].isalpha(): x=d.datetime.strptime(string,"%B %d %Y") else: x=d.datetime.strptime(string,"%m/%d/%Y") f=x.strftime("%-d/%-m/%Y").lstrip("0") print(f) ''' Gained 50 XP Vision '''
16th Sep 2020, 2:03 AM
Subham
Subham - avatar
+ 1
yes it's working on IDE.BUT the same code i could not run on sololearn editor. (while solving the coach problem) this problem is from medium level.
15th Sep 2020, 7:01 AM
Vision
Vision - avatar
+ 1
works fine. used your string you included. how did you run into error and what was the error code?
15th Sep 2020, 8:40 AM
Slick
Slick - avatar
+ 1
it's working on Sololearn as string provided is correct. Possible format issue while taking as input. show the Err, or format the input Vision
16th Sep 2020, 1:18 AM
Subham
Subham - avatar
+ 1
thanks...subham.but my question is that why my code not running in code coach problem however its running sololearn IDE(editor). the sting input i mentioned in the code is not working in code coach.
16th Sep 2020, 2:28 AM
Vision
Vision - avatar
+ 1
like I said, input needs formatting.
16th Sep 2020, 2:29 AM
Subham
Subham - avatar