+ 6
Can you help me with smart parking lot solved question?
I've been stuck on this for 2+ hours so far
47 odpowiedzi
+ 4
Share your code
+ 4
# Take the number of available spaces as an input
spaces = 20
# 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")
+ 4
AYESHA NOOR , don't plagiarize the answer/response that is already shared by Kyo.
If you have nothing to answer, please don't spam.
Shalom Polo, please create your own question and share the code you have created for your project to get further help from the community.
+ 2
Junior, thank you so so much for the help, I used what you told me and it totally worked, and I now understand how it does, thank you
0
What is the question?
0
Ok one sec both of you, I do all of my work on my computer
0
Ok, so it says "A smart parking lot displays different messages to the visitor based on the number of available spaces."
Then it says
Task
"Complete the program to inform the user about available spaces in the parking lot"
0
This is what I put
# Take the number of available spaces as an input
spaces = 20
# 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")
0
Seems good enough
0
@Junior pls help if you can
0
Same to the other guy
0
Is it showing you an error message? If so share it
0
Yeah but for some reason, it says Test case 1 and 2 are wrong and 3 is good
0
Show us what it states
0
but if i switch one thing like this
# Take the number of available spaces as an input
spaces = 20
# 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")
it says that 1 and 2 are right but 3 is wrong
0
its a practice thing, so I can't share it
0
If I could send pictures I would
0
Ok, I'm going to redo what I've sent you two and see if you two can help me in a better way
0
Smart Parking Lot Practice:
Problem
A smart parking lot displays different messages to the visitor based on the number of available spaces.
Task
Complete the program to inform the user about available spaces in the parking lot
https://lecontent.sololearn.com/material-images/3bb9df7e8d17458c82e8cd8defd47ee7-test_cases.png
0
This is what I start off with
# Take the number of available spaces as an input
spaces = int(input)
# Display message if spaces are available
if
print("Available spaces")
# Display a different message if spaces are not available
print("Sorry, the parking lot is full")