Python Program To Draw Virat Kholi
Last updated January 31, 2024 by Jarvis Silva
In this tutorial I will show you how to create a python program to draw Virat Kholi, Virat Kholi is a Indian player who is one of the GOAT of cricket and I am a fan of him so I decided to create this python program to draw him.
To draw Virat Kholi in python we will use the sketchpy library which enables us to draw sketch of anything by just providing a image so you need to first install the library, to install use below command.
pip install sketchpy
After installing the library let’s look at the code.
Python code to draw Virat Kholi
from sketchpy import canvas
img = canvas.sketch_from_svg("virat.svg",scale=70)
img.draw()
Above is the 3 lines of python code which will draw a sketch of Virat Kholi, In the code we give a image of Virat Kholi in svg format to the sketch_from_svg() function so before running this program you need to give it a image of Virat Kholi in svg format, you can download the Virat Kholi image I used from below.
After downloading the image move the image inside your python program folder and add the image path inside the sketch_from_svg() function and run the program, below is the output you will get.
Also Read: Python Program To Draw MS Dhoni Sketch
As you can see from above we successfully drawn Virat Kholi using python, I hope you liked this program and do share it with Virat Kholi fans they will love it thank you for reading, Have a nice day 😊