+ 3

Can you help me with smart parking lot solved question?

12th Jun 2023, 6:03 AM
Eyob Zewdei
Eyob Zewdei - avatar
5 Respuestas
+ 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
12th Jun 2023, 7:04 AM
Ausgrindtube
Ausgrindtube - avatar
+ 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?
12th Jun 2023, 11:36 AM
Eyob Zewdei
Eyob Zewdei - avatar
+ 3
Show your attempt first
12th Jun 2023, 9:28 AM
Hasnain [ACTIVE CHALLENGER]
Hasnain [ACTIVE CHALLENGER] - avatar
+ 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.
12th Jun 2023, 4:17 PM
Ausgrindtube
Ausgrindtube - avatar
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")
20th Jan 2024, 2:04 PM
Shyam Sundar Singh
Shyam Sundar Singh - avatar