Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

sololearn says code is wrong, python tutor says otherwise

I’m trying to learn python through sololearn in the mobile app but somehow the app only accepts its own codes or mine is wrong. If I run the code on pythontutor the code gives the desired output but sololearn keeps saying the code is wrong. The question has to convert an input to an integer in order to multiply it by a string and give a concatenated output

this is my code:

x = input()
y = int(input())

z = x * y

but sololearn says my answer is wrong

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

?

this is the pythontutor page where I had a supposedly successful output

>Solution :

Sololearn expects you to print your output, so that they can read it and check if it is correct:

x = input()
y = int(input())

z = x * y

print(z)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading