+ 1
why this code is not running on sololearn
from code coach problem. https://code.sololearn.com/cPK5OeW6nA85/?ref=app
8 Réponses
+ 3
Is it working in the IDE?
Ig, there's some problem in your code 🤔 (couldn't understand tho)
+ 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.
+ 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
'''
+ 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.
+ 1
works fine. used your string you included. how did you run into error and what was the error code?
+ 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
+ 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.
+ 1
like I said, input needs formatting.