Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Happy new year!
import math def happy(ny = 2020, magic = 123): i, j = 0, ny while (j - 1) * ny - 1 > magic: j = math.sqrt(j) i = i + 1 if i == 1: s = " "*(7+1) + "." elif i == 2: s = " "*(7+1) + "*" else: x = i - ((i+1)%2)*2 s = " "*(7-x) + ".*" + " "*(x+x-1) + "*." print(s) print(" Happy NY", ny, "!") happy(2020)
run
|
edit
|
history
|
help
0
24jan py
PyNewInit
function and doc string
HW selectionsort using while
main_game
short hand if else
Search element in a matrix
snake water gun game
ElaineBrown** rextester.com
Reading XML File