-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathJumpStatement.py
38 lines (33 loc) · 867 Bytes
/
JumpStatement.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#break statement - when break statement execute in the loop
#the loop will break , after that out of the loop will execute.
for i in range(5):
if i==3:
break;#here if value of i will 3 then loop will break
else:
print(i)
#continue statement- when continue statement execute then that
#skips other part will execute as it is .
print()
for i in range(5):
if i==3:
continue#here skips value 3
else:
print(i)
"""
pass: The pass statement is basically a null statement,
which is generally used as a placeholder. It is used to
prevent any code from executing in its scope.
"""
print()
for i in range(5):
if i % 2 == 0:
pass
else:
print(i)
#return -
def myreturn (x):
if x=='hello':
return True
else:
return False
print(myreturn(input()))