+ 1

Hi, I'm stuck on smart parking lot. I searched the community for help but it doesn't work. Can anyone help me?

spaces = int(input()) if spaces > 0: print("Available Spaces") else: print("Sorry, the parking lot is full") #Whats wrong with my code?

28th Nov 2023, 5:33 AM
Jay Pham
Jay Pham - avatar
4 Respuestas
+ 5
On line 3, 'Available Spaces' should be 'Available spaces' 😉
28th Nov 2023, 6:06 AM
Keith
Keith - avatar
+ 2
Axolotl Good observation! However, a default message when using the input() function is optional but is also not supported on the Sololearn platform. If a default message is provided, it will not be output. The code that the OP is having trouble with is from a specific lesson and I'm sure the answer provided is correct because I tested it 😉
28th Nov 2023, 1:27 PM
Keith
Keith - avatar
+ 1
Finally, tysm. It's just a typo that makes my code didn't work. I think sololearn should also accept my answer.
28th Nov 2023, 1:28 PM
Jay Pham
Jay Pham - avatar
0
I think its because on line 1 you didn’t put text in the input with quotations.
28th Nov 2023, 1:18 PM
Axolotl
Axolotl - avatar