+ 6

Can you help me with smart parking lot solved question?

I've been stuck on this for 2+ hours so far

31st Jul 2023, 9:35 PM
Kyo
Kyo - avatar
47 odpowiedzi
+ 4
Share your code
31st Jul 2023, 10:34 PM
Zeusofyogurt
Zeusofyogurt - avatar
+ 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")
1st Aug 2023, 2:14 PM
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫
𝐀𝐲𝐞𝐬𝐡𝐚 𝐍𝐨𝐨𝐫 - avatar
+ 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.
1st Aug 2023, 4:14 PM
D Shah 🎯⏳️
D Shah 🎯⏳️ - avatar
+ 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
1st Aug 2023, 2:19 PM
Kyo
Kyo - avatar
0
What is the question?
31st Jul 2023, 10:09 PM
Zeusofyogurt
Zeusofyogurt - avatar
0
Ok one sec both of you, I do all of my work on my computer
31st Jul 2023, 10:14 PM
Kyo
Kyo - avatar
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"
31st Jul 2023, 10:26 PM
Kyo
Kyo - avatar
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")
31st Jul 2023, 10:27 PM
Kyo
Kyo - avatar
0
Seems good enough
31st Jul 2023, 10:29 PM
Zeusofyogurt
Zeusofyogurt - avatar
0
@Junior pls help if you can
31st Jul 2023, 10:29 PM
Kyo
Kyo - avatar
0
Same to the other guy
31st Jul 2023, 10:29 PM
Kyo
Kyo - avatar
0
Is it showing you an error message? If so share it
31st Jul 2023, 10:30 PM
Zeusofyogurt
Zeusofyogurt - avatar
0
Yeah but for some reason, it says Test case 1 and 2 are wrong and 3 is good
31st Jul 2023, 10:31 PM
Kyo
Kyo - avatar
0
Show us what it states
31st Jul 2023, 10:32 PM
Zeusofyogurt
Zeusofyogurt - avatar
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
31st Jul 2023, 10:32 PM
Kyo
Kyo - avatar
0
its a practice thing, so I can't share it
31st Jul 2023, 11:52 PM
Kyo
Kyo - avatar
0
If I could send pictures I would
31st Jul 2023, 11:54 PM
Kyo
Kyo - avatar
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
1st Aug 2023, 12:51 AM
Kyo
Kyo - avatar
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
1st Aug 2023, 12:54 AM
Kyo
Kyo - avatar
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")
1st Aug 2023, 12:55 AM
Kyo
Kyo - avatar