Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
course_planning:code-testing [2024/01/19 13:39] – caballero | course_planning:code-testing [2024/01/19 13:44] (current) – caballero | ||
---|---|---|---|
Line 91: | Line 91: | ||
dt = 0.3 | dt = 0.3 | ||
+ | while True: | ||
+ | rate(200) | ||
+ | ball.pos = ball.pos + (ball.p/ | ||
+ | if not (side > ball.pos.x > -side): | ||
+ | ball.p.x = -ball.p.x | ||
+ | if not (side > ball.pos.y > -side): | ||
+ | ball.p.y = -ball.p.y | ||
+ | if not (side > ball.pos.z > -side): | ||
+ | ball.p.z = -ball.p.z | ||
+ | </ | ||
+ | |||
+ | |||
+ | ## With Line Numbers, Highlighting, | ||
+ | |||
+ | ### Syntax | ||
+ | |||
+ | ``` | ||
+ | <code python [enable_line_numbers=" | ||
+ | {YOUR CODE} | ||
+ | </ | ||
+ | ``` | ||
+ | |||
+ | **Note: Highlighting lines uses an absolute number (i.e., the given number of lines sets the length and order starting from 1).** | ||
+ | |||
+ | ### Example | ||
+ | |||
+ | <code python [enable_line_numbers=" | ||
while True: | while True: | ||
rate(200) | rate(200) |