Python Turtle Program To Draw Batman Logo

Python Code import turtle import math ink = turtle.Turtle() ink.speed(500) window = turtle.Screen() window.bgcolor("#000000") ink.color("yellow") bat = 20 ink.left(90) ink.penup() ink.goto(-7 * bat, 0) ink.pendown() for a in range(-7 * …

Read more

Python Turtle Program To Draw Pokemon Pikachu

Python Code import turtle def setValue(x, y): turtle.setx(x) turtle.sety(y) print(x, y) class pikachu: def __init__(self): self.t = turtle.Turtle() t = self.t t.pensize(3) t.speed(9) t.ondrag(setValue) def meme(self, x, y): self.t.penup() self.t.goto(x, …

Read more

Python Turtle Program To Creating Graph Paper

Python Code import turtle trtl=turtle.Turtle() trtl.speed(10) for i in range(0,400,20): trtl.pencolor('lightgrey') trtl.penup() trtl.setpos(-200+i,-200) if i==0: trtl.left(90) trtl.pendown() trtl.forward(400) trtl.backward(400) for i in range(0,400,20): trtl.pencolor('lightgrey') trtl.penup() trtl.setpos(-200,-200+i) if i==0: trtl.right(90) trtl.pendown() …

Read more

Python Turtle Program To Draw Radha Krishna

Python Code import turtle turtle.bgcolor('#FFCA8A') turtle.title("Radhe Krishna") screen= turtle.Screen() screen.setup(650,580) t1 = turtle.Turtle() t1.speed(4) t1.right(90) t1.pu() t1.forward(180) t1.left(90) t1.pd() t1.fillcolor("#A6F1B9") t1.begin_fill() t1.forward(400) t1.right(90) t1.forward(100) t1.right(90) t1.forward(800) t1.right(90) t1.forward(100) t1.right(90) t1.forward(400) …

Read more

Python Turtle Program Colorful Flower Design

Python Code import turtle turtle.setup(width=600, height=500) turtle.reset() turtle.hideturtle() turtle.speed(0) turtle.bgcolor('black') c = 0 x = 0 colors = [ #reddish colors (1.00, 0.00, 0.00),(1.00, 0.03, 0.00),(1.00, 0.05, 0.00),(1.00, 0.07, 0.00),(1.00, …

Read more

Python Turtle Program To Draw Doraemon

Python Code from turtle import * import turtle wn = turtle.Screen() wn.setup(width=1000, height=800) def my_goto(x, y): penup() goto(x, y) pendown() def eyes(): fillcolor(“#ffffff”) begin_fill() tracer(False) a = 2.5 for i …

Read more

Java Program To Get Screen Size

Example import java.awt.Toolkit; import java.awt.Dimension; public class javaScreenSizeExample { public static void main(String[] args) { Toolkit toolkit = Toolkit.getDefaultToolkit(); Dimension screenSize = toolkit.getScreenSize(); System.out.println("Screen size: " + screenSize.width + "x" …

Read more

Java Program To Perform Bubble Sort

01. Example: import java.util.Scanner; class bubbleSort { public static void main(String[] args) { int n, c, d, swap; Scanner in = new Scanner(System.in); System.out.println("Input number of integers to sort: "); …

Read more

Java Program To Perform Binary Search

01. Example: import java.util.Scanner; class BinarySearch { public static void main(String args[]) { Scanner in = new Scanner(System.in); System.out.println("Enter number of elements in the array: "); int numberOfElements = in.nextInt(); …

Read more