Posts

Showing posts with the label Python

Google logo using Turtle in Python

Image
  Google logo using Turtle in Python Input (Code) :- import turtle as g g . bgcolor ( "black" ) g . color ( 'Royal Blue' ) g . pensize ( 5 ) g . speed ( 5 ) ## first circle {red color} g . forward ( 120 ) g . right ( 90 ) g . circle ( - 150 , 50 )   g . color ( 'dark green' ) g . circle ( - 150 , 100 ) g . color ( 'orange' ) g . circle ( - 150 , 60 ) g . color ( 'red' ) g . begin_fill () g . circle ( - 150 , 100 ) g . right ( 90 ) g . forward ( 50 ) g . right ( 90 ) g . circle ( 100 , 100 ) g . right ( 90 ) g . forward ( 50 ) g . end_fill () g . begin_fill () ## second circle {yellow color} g . color ( "orange" ) g . right ( 180 ) g . forward ( 50 ) g . right ( 90 ) g . circle ( 100 , 60 ) g . right ( 90 ) g . forward ( 50 ) g . right ( 90 ) g . circle ( - 150 , 60 ) g . end_fill () # third circle {green color} g . right ( 90 ) g . forward ( 50 ) g . right ( 90 ) g . circle ( 100 , 60 ) g . color ( 'dark green'

Windows Logo using Turtle in Python

Image
Windows logo using Turtle in Python Input (Code) :- import turtle as w w . hideturtle () w . speed ( 1 ) w . bgcolor ( 'black' ) w . penup () w . goto ( - 50 , 60 ) w . pendown () w . color ( 'blue' ) w . begin_fill () w . goto ( 100 , 100 ) w . goto ( 100 , - 100 ) #Draw windows w . goto ( - 50 , - 60 ) w . goto ( - 50 , 60 ) w . end_fill () w . color ( 'black' ) w . goto ( 15 , 100 ) #cut 2 equal parts w . color ( 'black' ) w . width ( 10 ) w . goto ( 15 , - 100 ) w . penup () w . goto ( 100 , 0 ) w . pendown () w . goto ( - 100 , 0 ) w . goto ( 30 , - 180 ) w . color ( "blue" ) w . write ( "Windows" , font = ( "cooper" , 50 , "bold" ), align = "center" ) w . done () Output :-  Watch this Short for result :-  https://youtube.com/shorts/Lh1gTz5nFfM?feature=share  

Facebook Logo using Turtle in Python

Image
Facebook logo using Turtle in Python Input (Code) :- import turtle as f f . speed ( 10 ) f . color ( "#0270d6" ) f . bgcolor ( 'black' ) f . penup () f . goto ( 0 , 150 ) f . pendown () f . begin_fill () f . forward ( 150 ) f . circle ( - 50 , 90 ) f . forward ( 300 ) f . circle ( - 50 , 90 ) f . forward ( 300 ) f . circle ( - 50 , 90 ) f . forward ( 300 ) f . circle ( - 50 , 90 ) f . forward ( 150 ) f . end_fill () f . color ( "white" ) f . penup () f . goto ( 140 , 80 ) f . pendown () f . begin_fill () f . right ( 180 ) f . forward ( 50 ) f . circle ( 80 , 90 ) f . forward ( 50 ) f . right ( 90 ) f . forward ( 80 ) f . left ( 90 ) f . forward ( 40 ) f . left ( 90 ) f . forward ( 80 ) f . right ( 90 ) f . forward ( 160 ) f . left ( 90 ) f . forward ( 55 ) f . left ( 90 ) f . forward ( 160 ) f . right ( 90 ) f . forward ( 70 ) f . left ( 80 ) f . forward ( 45 ) f . left ( 100 ) f . forward ( 80 ) f . right ( 90 ) f . forward ( 40 ) f . circle ( - 40 , 90

Instagram Logo using Turtle in Python

Image
Instagram logo using Turtle in Python Input (Code) :- import turtle as i i . bgcolor ( 'black' ) i . pencolor ( '#bc2a8d' ) i . width ( 23 ) i . penup () i . goto ( 160 , - 100 ) i . pendown () i . left ( 90 ) for a in range ( 4 ):   i . forward ( 250 )   i . circle ( 34 , 90 ) i . penup () i . goto ( 85 , 30 ) i . pendown () i . circle ( 80 , 360 ) i . penup () i . goto ( 110 , 130 ) i . pendown () i . circle ( 7 , 360 ) i . done () Output :-  Watch this Short for result :-  https://youtube.com/shorts/FBepEBsPo_c?feature=share

Microsoft logo using Turtle in Python

Image
Microsoft logo using Turtle in Python Input (Code) :- import turtle as m m.bgcolor( "Black" ) def first_box ():     m.goto( - 130 , 0 )     m.color( "red" )     m.begin_fill()     for i in range ( 4 ):         m.forward( 100 )         m.left( 90 )     m.end_fill()     m.penup() def second_box ():     m.goto( 0 , 0 )     m.color( "green" )     m.begin_fill()     m.pendown()     for i in range ( 4 ):         m.forward( 100 )         m.left( 90 )     m.end_fill()     m.penup() def third_box ():     m.goto( - 130 , - 130 )     m.color( "blue" )     m.begin_fill()     m.pendown()     for i in range ( 4 ):         m.forward( 100 )         m.left( 90 )     m.end_fill()     m.penup() def fourth_box ():     m.goto( 0 , - 130 )     m.color( "orange" )     m.begin_fill()     m.pendown()     for i in range ( 4 ):         m.forward( 100 )         m.left( 90 )     m.end_fill()             print (first_box()) print (second_box()) print (

Python Source Code

Image
Simple & Easy 2 Digit Calculator using Python in only 12 lines . Code   :- a = int ( input ( 'Enter your 1st Number' )) b = int ( input ( 'Enter your 2nd Number' )) Operator = input ( 'Enter your Operator' ) if ( Operator == '+' ):     print ( 'Answer :' , a + b ) elif ( Operator == '-' ):     print ( 'Answer :' , a - b ) elif ( Operator == '*' ):     print ( 'Answer :' , a * b ) else :     print ( 'Answer :' , a / b ) Farenhit To Celcius Using Python . Code  :- F= input ( "Enter Temperature in Farenheit :" ) C=( float (F)- 32 )/ 1.8 print ( "Temperature in Celcius" ,C)

Python Programming Language

Image
  Python programming language that covers the basics as well as advanced concepts: Introduction: Python is a high-level, interpreted programming language that was first released in 1991. It was created by Guido van Rossum and has since become one of the most popular programming languages in the world. Python is known for its simple and easy-to-learn syntax, making it a great language for beginners and experienced programmers alike. Features of Python: Easy to learn and use: Python has a simple and straightforward syntax that is easy to learn and understand. Interpreted language:   Python is an interpreted language, which means that the code is executed line by line, making it easier to debug and test. Dynamic Typing: In Python, you do not need to declare the type of a variable. The type of a variable is determined automatically based on the value assigned to it. Object-Oriented Programming: Python supports object-oriented programming (OOP), making it easy to create and us