Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
circle
#python 3.5.2 # Python implementation # to print circle pattern import math # function to print circle pattern def printPattern(radius): # dist represents distance to the center # for horizontal movement for i in range((2 * radius)+1): # for vertical movement for j in range((2 * radius)+1): dist = math.sqrt((i - radius) * (i - radius) + (j - radius) * (j - radius)) # dist should be in the # range (radius - 0.5) # and (radius + 0.5) to print stars(*) if (dist > radius - 0.5 and dist < radius + 0.5): print("*",end="") else: print(" ",end="") print() # Driver code radius = 10 printPattern(radius) # This code is contributed # by Deepak
run
|
edit
|
history
|
help
0
Payth
Making of floor() and ceil() functions
snake water gam correct
3-6.격자판 최대합
Game4
estadale
10 25 58
denemeler
shiva
ванечка с тебя 200 рублей, жду мой сладкий 🤑