BEGINNERS' CORNER #1300
Replies: 5 comments 3 replies
-
In the above example Parameters 1 to 3 should be aligned vertically, starting around column 18. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your note. You can find various examples with comments on the projects site as well as throughout the documentation you've linked to. Pybricks is based on Python and follows all the same syntax rules, including comments. We don't currently have a complete beginner's guide yet. However, we'll soon release a visual code editor which will help assemble code visually, so you get the correct syntax automatically. We're planning to add a comment block, too! |
Beta Was this translation helpful? Give feedback.
-
The basic syntax is largely the same as Python, and there are plenty of basic Python tutorials available for beginners. Therefore, there's really no need to reinvent the wheel in the Pybricks documentation. You can make comments by prefacing a line with #. Here are a few examples:
As for splitting statements into multiple lines, you can simply indent each sub-line. For example:
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the update, jmancoder. |
Beta Was this translation helpful? Give feedback.
-
OK - I think I found it via:- #Comment with two leading spaces before the hash. Keep cursor on that line, hit F1, enter "Indent" in the search box, then from the options select "Detect Indentation from Content". Thanks! |
Beta Was this translation helpful? Give feedback.
-
I used to be a professional programmer (I'm now retired), and some fool gave me a Lego Spike kit.
I've followed a few build projects, and then got Anton's Mindstorm board for a remote control option, which led me to Pybricks code.
I've seen 'https://docs.pybricks.com/en/latest/index.html' as documentation for Pybricks, but there are some basic (very!!!) questions left unanswered.
Primarily these are
Invoke_something(Parameter1,
Parameter 2,
Parameter 3)
It's all probably blindingly obvious, but I still can't find an Idiot's Guide which covers such basic topics such as the structure of a statement etc.
Can any kind soul help?
Beta Was this translation helpful? Give feedback.
All reactions