+ 3
Can you help me with smart parking lot solved question?
5 odpowiedzi
+ 4
To be able to help you:
Look through your lessons again. See if you've missed something.
Search the forum or online, see if there's anything to help you there, as per this code:
Finally, copy the task description and add it here, then copy your code and attach it as per this guide:
https://code.sololearn.com/Wek0V1MyIR2r/?ref=app
https://code.sololearn.com/W0uW3Wks8UBk/?ref=app
+ 4
# Take the number of available spaces as an input
spaces = 20
if spaces > 0:
print ("Available spaces")
# Display a different message if spaces are not available
else:
print("Sorry, the parking lot is full")
What is wrong with this code?
+ 3
Show your attempt first
+ 1
The first line is a comment and the comment tells you that you need to accept input.
You don't accept input, you declare a variable with the integer 20.
Review the lesson about inputs and everything else looks good.
0
/*
The code you have written is completely correct (syntax wise). But according to the question, it says to take the available space as an input. So, the code will be as follows:
*/
spaces = int(input())
if spaces > 0:
print ("Available spaces")
else:
print("Sorry, the parking lot is full")