Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b0ce2c7

Browse files
Create Exercise on Selection in Python - Level 1.py
1 parent 665a7c0 commit b0ce2c7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#lex_auth_01269363490743091290
2+
3+
def display(num):
4+
message=""
5+
#write your logic here
6+
if num%3 == 0 and num%5 == 0:
7+
message="Zoom"
8+
elif num%3 == 0:
9+
message="Zip"
10+
elif num%5 == 0:
11+
message="Zap"
12+
else:
13+
message="Invalid"
14+
return message
15+
16+
#Provide different values for num and test your program
17+
message=display(9)
18+
print(message)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /