Skip to content

Commit 0bfc4e9

Browse files
authored
Update README.md
1 parent 15bb3d4 commit 0bfc4e9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,23 @@ else:
6060
```
6161
Note that the colon (:) following <expr> is required.
6262
Similarly, the `nested if` also works.
63+
64+
65+
### Iterative statements
66+
As other programmin languages, we have
67+
68+
+ `for loop`
69+
```python
70+
for i in range(5):
71+
print(i)
72+
```
73+
The `range` function starts off with 0 till the number(excluded).
74+
75+
+ `while loop`
76+
```python
77+
i=0
78+
while(i<10):
79+
print("{} is less than 10".format(i))
80+
i+=1
81+
```
82+
`.format()` is a type of printing.

0 commit comments

Comments
 (0)