filmov
tv
How To Create Computer Design Using Python turtle #python #programming #coding #graphics

Показать описание
This tutorial will create a cartoon-style computer design using the Python turtle library. The design will include a monitor, a keyboard, and some details to make it visually appealing. So guys let's have some fun by making some excellent graphics in Python turtle.
Complete code:
import turtle
# Set up the screen
screen = turtle.Screen()
# Create a turtle for drawing
artist = turtle.Turtle()
# Function to draw a rectangle
def draw_rectangle(t, x, y, width, height, color):
for _ in range(2):
# Function to draw a screen (monitor)
def draw_monitor():
# Monitor body
draw_rectangle(artist, -150, 50, 300, 200, "grey")
# Screen
draw_rectangle(artist, -140, 60, 280, 180, "black")
# Function to draw a stand
def draw_stand():
# Stand base
draw_rectangle(artist, -50, -50, 100, 20, "darkgrey")
# Stand neck
draw_rectangle(artist, -20, 0, 40, 50, "darkgrey")
# Function to draw a keyboard
def draw_keyboard():
# Keyboard body
draw_rectangle(artist, -200, -100, 400, 50, "grey")
# Keys (simple lines)
for row in range(4):
for col in range(10):
# Draw the computer
draw_monitor()
draw_stand()
draw_keyboard()
# Hide the turtle and display the design
Complete code:
import turtle
# Set up the screen
screen = turtle.Screen()
# Create a turtle for drawing
artist = turtle.Turtle()
# Function to draw a rectangle
def draw_rectangle(t, x, y, width, height, color):
for _ in range(2):
# Function to draw a screen (monitor)
def draw_monitor():
# Monitor body
draw_rectangle(artist, -150, 50, 300, 200, "grey")
# Screen
draw_rectangle(artist, -140, 60, 280, 180, "black")
# Function to draw a stand
def draw_stand():
# Stand base
draw_rectangle(artist, -50, -50, 100, 20, "darkgrey")
# Stand neck
draw_rectangle(artist, -20, 0, 40, 50, "darkgrey")
# Function to draw a keyboard
def draw_keyboard():
# Keyboard body
draw_rectangle(artist, -200, -100, 400, 50, "grey")
# Keys (simple lines)
for row in range(4):
for col in range(10):
# Draw the computer
draw_monitor()
draw_stand()
draw_keyboard()
# Hide the turtle and display the design
How to create shapes in microsoft word?
corel draw | corel draw x7 | corel draw design | computer beginners | computer basics | corel draw
Graphic design || Graphic design full course || Graphic design tutorials for beginners
How Laptops Are Made in Factories | How It's Made
How to draw shapes in Microsoft Paint?
Computer Aided Jewellery Design - CAD - Fast!
Tropical sketchin’ 🌴
A day in the life of a Graphics Designer
Effortless Design with Gutenberg No Cod #designing #facts #core
Front page design for school project | Front page design for computer project | MS Word #project
HOW TO CREATE A CANVA T SHIRT DESIGN
How to Make 3D Bottle in Adobe Illustrator
How to draw ms paint design 🎨🎨 #shorts | computer drawing | ms paint @littlestarkidchannel
How To Create Computer Table Flat Design Speed Tutorial | Course Deals
How to create a table in Microsoft Word | Unique Method of Table Creation in MS Word #shorts
Adobe Illustrator CC Tutorial - How to make an Apple Vintage computer Design
How to Build a Gaming PC in Minecraft 1.18 I Computer Design #minecraft #shorts
Banking App - Sketch to UI Design Process
How to Make 2D Animation | Flash Animation Tutorial in Hindi | 2D Animation Video| Character Design
Step by step infographic design for your business #powerpoint #business
how to make beautiful design in Corel draw #youtubeshorts #shorts #computer #coreldraw #viral
How to create sewing patterns in Illustrator! #shorts
COMPUTER🖥️✨🤩 Front page design || Project Paper & Assignment || #shorts #ytshort #computer...
How to create graphics using Python turtle 🐍🐢 #coding
Комментарии