Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
on_off
#python 2.7.12 def onoff(n): if n % 3 == 0 and n % 5 == 0: return 'OnOff' elif n % 3 == 0: return 'On' elif n % 5 == 0: return 'Off' else: return str(n) print "\n".join(onoff(n) for n in xrange(1, 100))
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Problem: binary
python bois
PyPropertyDecorator
building a basic calculator
mad libs game
http_request
functional python - from hackernoon.com, lean functional python in 10 min
Mounesh
Filter dictionaries with specific keys
PyClassMethod
Please log in to post a comment.