ma.py

Created by wperez274

Created on September 09, 2023

1011 Bytes


from kandinsky import *

# Set screen dimensions
WIDTH = 320
HEIGHT = 240

# Clear the screen
fill_rect(0, 0, WIDTH, HEIGHT, color(255, 255, 255))

# Define colors
RED = color(255, 0, 0)
BLUE = color(0, 0, 255)
BROWN = color(139, 69, 19)
BLACK = color(0, 0, 0)
WHITE = color(255, 255, 255)

# Create Super Mario
# Head
fill_rect(110, 40, 20, 20, RED)
fill_rect(100, 60, 40, 20, RED)

# Hat
fill_rect(110, 30, 20, 10, BROWN)
fill_rect(100, 40, 40, 10, BROWN)

# Eyes
fill_rect(115, 50, 5, 5, WHITE)
fill_rect(130, 50, 5, 5, WHITE)

# Body
fill_rect(110, 80, 20, 30, BLUE)
fill_rect(100, 110, 40, 10, BLUE)

# Legs
fill_rect(110, 140, 5, 20, BLUE)
fill_rect(125, 140, 5, 20, BLUE)
fill_rect(110, 160, 15, 5, RED)
fill_rect(120, 165, 5, 10, RED)

# Shoes
fill_rect(105, 180, 15, 5, BLACK)
fill_rect(125, 180, 15, 5, BLACK)

# Arms
fill_rect(85, 90, 15, 5, RED)
fill_rect(140, 90, 15, 5, RED)

# Gloves
fill_rect(80, 85, 10, 10, WHITE)
fill_rect(155, 85, 10, 10, WHITE)

# Display the image on the screen

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.