1counter = 1
2while counter < 11:
3 print(counter, end = ‘ ‘)
4 counter=(counter + 1)
5
1var = ' this is a test '
2
3word_counter = 0
4
5start_status = True
6
7for i in range(len(var)):
8
9 if var[i] != ' ':
10
11 if start_status == True:
12
13 word_counter = word_counter + 1
14
15 start_status = False
16
17 if var[i]==' ':
18
19 start_status = True
20 print(word_counter)