Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to assign the value 10 to variable #1.
CNC Programming
#1 = [1]
Attempts:
3 left
💡 Hint
Common Mistakes
Using a variable name instead of a number.
Forgetting to assign a value.
✗ Incorrect
In parametric programming, variables are assigned values using the equals sign. Here, #1 is assigned the value 10.
2fill in blank
mediumComplete the code to add 5 to variable #2 and store the result in #3.
CNC Programming
#3 = #2 [1] 5
Attempts:
3 left
💡 Hint
Common Mistakes
Using subtraction instead of addition.
Using multiplication or division by mistake.
✗ Incorrect
The plus sign (+) adds 5 to the value of #2 and stores it in #3.
3fill in blank
hardFix the error in the code to correctly compare if #4 is greater than 100.
CNC Programming
IF [#4 [1] 100] THEN
Attempts:
3 left
💡 Hint
Common Mistakes
Using less than instead of greater than.
Using equals or less than or equal operators.
✗ Incorrect
The greater than operator (>) checks if #4 is more than 100.
4fill in blank
hardFill both blanks to create a loop that repeats 5 times.
CNC Programming
WHILE [#[1] [2] 5] DO ; loop body ENDWHILE
Attempts:
3 left
💡 Hint
Common Mistakes
Using greater than instead of less than.
Starting count from 0 instead of 1.
✗ Incorrect
The loop uses variable #1 and repeats while #1 is less than 5.
5fill in blank
hardFill all three blanks to create a conditional that sets #10 to 1 if #5 equals 0.
CNC Programming
IF [#[1] [2] [3]] THEN #10 = 1 ENDIF
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '='.
Comparing with wrong variable or value.
✗ Incorrect
The condition checks if #5 equals 0 using the '=' operator.
