Clear, concise, and board-focused. View the live demo below.
| Data Type | Example | Description |
|---|---|---|
int |
10, -5 | Whole numbers (Integers) |
float |
3.14, 9.8 | Decimal numbers (Floating Point) |
str |
"Hello" | Comparison of text characters (String) |
bool |
True | Logical values (Boolean) |
This loop prints numbers from 1 to 5. range(1,6) means start at 1 and stop
before 6.
In board exams, always write the output of the loop clearly below your code to avoid step-mark deduction.