Posts

Showing posts from April, 2023

Eid Mubarak greeting card

Image
This code uses the Turtle graphics library to draw a simple Eid Mubarak greeting card. The main elements of the card are a black circle and a gold star on top of it, with several smaller gold stars scattered randomly around the card. Eid Mubarak greeting card Copy Clipboard   import turtle as t import random as r t . speed ( 10 ) def star ():     t . left ( 90 )     t . forward ( 90 )     t . pencolor ( "#d4ad4c" )     t . begin_fill ()     for _ in range ( 5 ):         t . color ( "#d4ad4c" )         t . forward ( 51 )         t . left ( 144 )     t . end_fill () t . pen ( pensize = 5 , pencolor = "#d4ad4c" ) t . bgcolor ( "#000000" ) t . up () t . goto ( - 50 , 15 ) t . down () t . begin_fill () t . color ( '#d4ad4c' ) t . circle ( 120 ) t . end_fill () t . up () t . goto ( - 20 , 25 ) t . down () t . be...

Draw Tony Stark Using python with code

Image
If you're interested in drawing Tony Stark using Python, you've come to the right place! In this tutorial, I'll guide you through the process of drawing Tony Stark's face using Python programming. Tony Stark, also known as Iron Man from the Marvel movies, is a popular and beloved character. To draw him, we'll be using the sketchpy module, which provides predefined sketches that we can incorporate into our program. Drawing Tony Stark in Python can be complex, but with the sketchpy module, it can be done with just three lines of code. So, let's get started! Draw Tony Stark Using python with code copy clipboard   from sketchpy import library as lib obj = lib . rdj () obj . draw () The Python code provided above draws a Spiral Hexagon, but in order to run this program, you must have Python installed on your computer. If you don't have Python installed, you can follow these steps to install and set it up ...

Spiral Hexagon Python Code

Image
In this tutorial, I will show you how to draw a Spiral Hexagon using Python and the turtle module. If you're interested in learning how to create this design, then you've come to the right place. We will be using the turtle module to draw the Spiral Hexagon. The turtle module is a powerful GUI (Graphical User Interface) library that allows you to draw anything you want in Python. If you're unfamiliar with the turtle module, don't worry. I'll guide you through every step of the process and provide you with the necessary code to create this design. So, let's get started and follow along until the end of this tutorial. Spiral Hexagon Python Code copy clipboard   import turtle colors = [ "cyan" , "yellow" , "blue" , "green" , "white" , "red" ] p = turtle . Pen () turtle . bgcolor ( "black" ) for i in range ( 300 ):     p . pencolor ( colors [...