Advertisement
Guest User

Untitled

a guest
Apr 4th, 2020
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. from PIL import Image, ImageDraw
  2.  
  3. n = int(input())
  4.  
  5. img = Image.new('RGB', (8*n, 8*n-1), 'White')
  6. dib = ImageDraw.Draw(img)
  7.  
  8. dib.ellipse([0, 0, 8*n-1, 8*n-1], 'Blue')
  9. dib.ellipse([n, n, (6*n-1)+n, (6*n-1)+n], 'Yellow')
  10. dib.ellipse([n*2, n*2, (4*n-1)+2*n, (4*n-1)+2*n], 'Red')
  11. dib.ellipse([n*3, n*3, (2*n-1)+3*n, (2*n-1)+3*n], 'Green')
  12.  
  13. img.save('output.png')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement