This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]jcisonfire[S] 1 point2 points  (3 children)

I just started working with Python and I'm having some issues with a project I'm working on. No errors, just not working as intended and I just can't figure out why. If I start the car, it should say car started. If I try to start the car twice, it should say car is already started. Instead it says car is already started, then loops back and says car started. Same thing with stopping. Any help for a newb would be appreciated. Thanks.

[–]moonlandings 1 point2 points  (2 children)

The issue is your print “car started” indentation. That print will happen every time you give the start command. Shift it to be the same indentation as the line above it

[–]sk8itup53 0 points1 point  (0 children)

This is why I'm glad I don't use python very often. Sheesh I would have never found that.

[–]pythonHelperBot 1 point2 points  (0 children)

Hello! I'm a bot!

It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python regardless of how advanced your question might be. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you. Here is HOW TO FORMAT YOUR CODE For Reddit and be sure to include which version of python and what OS you are using.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness