+ 1
The test ouput is not working. It is Python Basics and smart parking lot
spaces = int(input( )) # Display message if spaces are available if spaces>0: print("Available spaces") # Display a different message if spaces are not available else: print("Sorry, the parking lot is full") The test output is not working. Conditional Statements.
13 Answers
+ 1
It would greatly help us if you linked the lesson.
+ 1
It is under Introduction to Python / Python Developer
Chapter: Control Flow
Practice: Smart Parking Lot
Your code looks fine to me.
Do you use a web browser?
The recent update on the web is broken for me.
Try the app and see if your code works.
+ 1
Can you please link the code that you currently have, so we can view the full code and better support you. Thank you.
+ 1
Various people have been reporting that sometimes code checking gets stuck halfway through. It isn’t your fault, and likely isn’t your system’s fault.
0
Div Anand
Since you are currently taking the "Introduction to Python" course, it is obvious that you mean the "Smart Parking Lot" practice from the "Control Flow" chapter.
Your code is error-free and delivers the expected result.
I have tested it with the Sololearn Android app, the Sololearn iPhone app and with the Sololearn web app with Firefox and Microsoft Edge.
All versions accept your code.
So, what error message are you getting and which Sololearn app are you using?
0
Niels F 🇩🇪 <html challenger>
If using a browser and re-run the test, everything is fine (I guess it is your case.)
If the test is unsolved, it will show "Checking the code... 1/2" and stop there.
For now, only the app works...
0
Wong Hei Ming
So you think, that all unsolved practices are not accepted in the web version?
0
Niels F 🇩🇪 <html challenger>
I didn't think, but tested.
I'm doing C++ and facing the exact problem, and filed a bug report.
0
Wong Hei Ming
I just tested it with an unsolved practice in the 'Introduction to Python' course using the SoloLearn web version with Firefox on Windows 10, and my code was accepted by SoloLearn and I received the 5 XP for it.
What operating system and browser are you using?
0
spaces = int(input( ))
# Display message if spaces are available
if spaces >= 1:
print("Available spaces")
# Display a different message if spaces are not available
else:
print("Sorry, the parking lot is full")
I changed
If spaces>0:
To
If spaces>=1:
0
Niels F 🇩🇪 <html challenger>
I'm on Windows 11 23H2 (build 22631.3447) with Firefox 125.0.3
0
🇸🇾 Abdulaziz Alnaser 🇸🇩
His published code works and is accepted by SoloLearn as a correct solution. Therefore, there is no reason to change it. Moreover, the conditions spaces > 0 and spaces >= 1 yield exactly the same result in this context.
0
It should work.. the code is good.