Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
RandomShape
#Python 2.7.17 #Different shape # demonstration of if-elif-if # #this code is created by Rezaul Hoque on September 22,2021;contact:jewelmrh@yahoo.com ##note: codes shared by Rezaul Hoque on rextester are not for sale; they are created and shared to facilitate the algorithm learning process; many like Hoque use this platform to practice programming ;Rezaul hopes his contribution helps others to fine tune their learning; ## import random print "Random shape\n" shape= random.randrange(3) if shape==0: print \ """ ===================== | | | | | | | | ===================== """ elif shape == 1: print \ """ ~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ # # # # # # # # # # # # # # # # ~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~ """ elif shape == 2: print \ """ * * * * * * * * * * * * """ else: print "\No shape defined\n" input("\nPress any key to exit")
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Dictionary comprehension - convert to lowercase
on_off
rString__1
single_digit_5
gameboy
PyNameMangling
Attempt to fork bomb server
1 code
Max
Simple code to find all divisors for a number
Please log in to post a comment.