Skip to main content

Posts

Age Calculator in Python and Tkinter

Age Calculator Python Source Code  Python and Tkinter soure code for age calculator project # Source code for creating the age calculator from tkinter import * from datetime import datetime # Main Window & Configuration App = Tk() App.title("Age Calculator") App['background'] = 'white' App.geometry('300x300') # 'Enter Your DOB' Label lbl = Label(App, text='Enter Your DOB', background='white', foreground='black') lbl.grid(row=0, column=0, columnspan=2) # Date Label & Entry widget dateL = Label(App, text='Date:', background='white', foreground='black') dateE = Entry(App, background='white', foreground='black', width=2) # Month Label & Entry widget monL = Label(App, text='Month:', background='white', foreground='black') monE = Entry(App, background='white', foreground='black', width=2) # Year Label & Entry widget yrL = Label(App,...

To-Do list Project

 To-do list Project in Javascript Program to create a to-do list project in HTML, CSS and Javascript. <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <title>To Do List</title> </head> <body>   <div style="margin-left: 20%; margin-right: 20%; margin-top: 5%">     <h1 align="center" style="color: Green; font-family: Lucida Console"> My Task List</h1>     <br>     <div class="row" align="center" style="border: 2px solid green ;  border-radius: 20px;  height: 15%;  width: 60%; margin-top: 20px; margin-left:20% ; margin-bottom: 3%; ">       <form>         <div class="input-group">           <input type="text" id="box" style="width:20vw;  height: 2vw; margin-top: 20px; border: none; border-bottom: 2px solid green" placeholder...
Digital Clock Project in Javascript Create a digital clock using HTML, CSS, and javascript. <html lang="en"> <head>   <meta charset="UTF-8">   <title>Digital Clock</title> </head> <body> <div style="margin-left: 20%;  margin-right: 20%; margin-top: 5%"; align: center;> <h1 align="center"  style="color: Green; font-size: 60px;  font-family: Gill Sans;"> Digital Clock </h1>     <div class="row" align="center" style="border: 2px solid green ; border-radius: 20px; height: 20%; width: 70%; margin-top: 20px; margin-left:10% ; margin-bottom: 3%; background-color: Green; ">        <h1 id="clock"  style=" font-family: Gill Sans; font-size: 60px;  align:center; color: White;"></h1>     </div> </div> <script type="text/javascript"...

Number Guessing game In C Programming Language

Guess the Number Number Guessing Game in C language. /* Program to make a number guessing game */ #include<stdio.h> main() {  int i,num=51,flag=1,guess,count=0;  printf("Guess the number\n");  scanf("%d",&guess); do  {   if(num==guess)   {    flag=0;   }   else if(guess<num)   {    flag=1;    printf("Your guess is lower than the number\n");    count++;   }   else   {     flag=1;    printf("Your guess is greater than the number\n");    count++;   }   if(flag==1)   {     printf("Sorry! Please guess it again\n");    scanf("%d",&guess);   }  } while(flag);  printf("Congrats! You guessed the number %d\n",num);  printf("Number of trails: %d\n",count); } Watch the video :  https://youtu.be/i6Xlvvm8rd4

Python Turtle Tutorials : Program to create a Ninja Circle

 Python Turtle tutorials Program to create amazing  Ninja Circle logo design in Python.  Code :  """ Program to create a Bi-pyramid structure Source : CODE PROBLEM (Youtube) """ import turtle turtle.Screen().bgcolor( "black" ) # set the background color to black turtle.speed( 0 ) # the fastest speed turtle.pensize( 2 ) # set the width of the drawing pen rainbow = [ 'red' , 'orange' , 'yellow' , 'green' , 'blue' , 'indigo' ] for i in range ( 110 ): turtle.color(rainbow[i% 6 ]) turtle.fd( 100 ) turtle.right( 28 ) turtle.fd( 30 ) turtle.left( 90 ) turtle.fd( 70 ) turtle.right( 30 ) turtle.fd( 50 ) turtle.penup() turtle.setposition( 0 , 0 ) turtle.pendown() turtle.right( 1 ) #hide the turtle after the shape has been drawn turtle.hideturtle() turtle.done() Output :      Learn through video : https://youtu.be/DhWbPnVfonY

Python Turtle tutorials : Create a Bi-Pyramid structure

 Python Turtle Tutorials  Create a Bi-Pyramid structure using Python  Code :           """ Program to create a Bi-pyramid structure Source : CODE PROBLEM (Youtube) """ import turtle scr = turtle.Screen() # create screen object scr.bgcolor( 'black' ) turtle.speed( 0 ) # the fastest speed turtle.pensize( 2 ) # set the width of the drawing pen turtle.color( 'skyblue' ) # set pencolor to 'skyblue' for i in range ( 30 ): turtle.fd(i* 10 ) turtle.right( 120 ) for j in range ( 29 , 0 ,- 1 ): turtle.fd(j* 10 ) # move forward turtle.left( 120 ) turtle.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen Output : Learn from video : Watch on youtube

Python Turtle Programs : Attractive Shell Design using Python

 Python Turtle Create a Shell like design using Python turtle. Code : """ Program to create a shell structure Source : CODE PROBLEM (Youtube) """ import turtle trt= turtle.Turtle() # create turtle object scr = turtle.Screen() # create screen object scr.bgcolor( 'black' ) colors = [ 'red' , 'orange' , 'yellow' , 'green' , 'blue' , 'indigo' , 'violet' , 'skyblue' ] trt.pensize( 3 ) # set the width of the drawing pen trt.speed( 0 ) # the fastest speed dis = 292 # initial value for c in colors: # using different colors at each iteration trt.color(c) for j in range ( 9 ): trt.left( 10 ) for i in range ( 3 ): trt.forward(dis) trt.left( 119 ) dis -= 4 trt.hideturtle() # hiding the turtle after the completion of the drawing turtle.done() # for holding the screen Output : Watch Video : Python Shell Design

Python Turtle : Create a attractive Petal Design

 Python Turtle Attractive Petal design in Python  import turtle # create the turtle object trt = turtle.Turtle() # create the screen object scr = turtle.Screen() #increase the pensize trt.pensize( 3 ) # set the background color to black scr.bgcolor( 'black' ) # set the pencolor to white colors = [ 'red' , 'orange' , 'yellow' , 'skyblue' , 'blue' , 'indigo' , 'violet' ] # increase the speed trt.speed( 0 ) # now first create a single petal # lets define the distance dis = 50 trt.color( "yellow" ) for color in range ( 20 ): for j in range ( 1 , 8 ): trt.left( 50 ) for i in range ( 2 ): trt.forward(dis) trt.left( 60 ) #rotate at 60 degree in clockwise trt.forward(dis) trt.left( 120 ) #rotate at 120 degree in clockwise dis = dis + 5 #hide the turtle after the shape has been drawn trt.hideturtle() turtle.done() Output : Learn thr...
Python turtle Create a sunflower using the Python turtle. import turtle # create the turtle object trt = turtle.Turtle() # create the screen object scr = turtle.Screen() #increase the pensize trt.pensize( 2 ) # set the background color to black scr.bgcolor( 'black' ) # increase the speed trt.speed( 0 ) # now first create a single petal # lets define the distance dis = 110 trt.begin_fill() trt.color( 'orange' , 'yellow' ) for j in range ( 1 , 25 ): trt.left( 15 ) for i in range ( 2 ): trt.forward(dis) trt.left( 30 ) # rotate at 60 degree in clockwise trt.forward(dis) trt.left( 150 ) # circle at center trt.end_fill() trt.goto( 0 ,- 40 ) trt.begin_fill() trt.color( 'orange' ) trt.circle( 40 ) trt.end_fill() #hide the turtle after the shape has been drawn trt.hideturtle() turtle.done()

Create a Rainbow Colored Benzene Structure using Python Turtle

  PYTHON TURTLE Create a Rainbow Colored Benzene Structure import turtle #import the turtle library trt = turtle.Turtle() #initialize the turtle object scr = turtle.Screen()     #initialize the Screen object scr.bgcolor( 'black' )          #set the background color to "black" scr.title( 'Color Benzene' ) #title of the scren trt.speed( 0 ) #speed of the drawing rainbow = [ 'red' , 'orange' , 'yellow' , 'green' , 'blue' , 'indigo' ] #colors to be used for i in range( 300 ): trt.pencolor(rainbow[i% 6 ]) trt.width(i/ 100 + 1 ) trt.forward(i) trt.left( 59 ) turtle.done() trt.hideturtle() Watch the video :

Graphics in Python using Turtle framework

  Python turtle Tutorial : Create an amazing Tiranga badge   Tiranga badge using Python Turtle. # first import the turtle module import turtle # create the turtle object trt = turtle.Turtle() #create the screen object scr = turtle.Screen() scr.setup( 850 , 850 ) # set the background color of the window (canvas) to balck scr.bgcolor( 'black' ) # increase the speed of the turtle trt.speed( 0 ) # increase the width of the turtle trt.pensize( 5 ) # now define list of colors required colors = [ 'orange' , 'white' , 'green' ] # now get into the central part of the logic radius = 150 # initially the radius is 150px # first define a for loop for every color for color in colors: # define a for loop for number of required iteration .. here we need 5 for i in range ( 6 ): # now define the loop for drawing the circles and changing the size for j in range ( 6 ): trt.color(color) trt.circle(radius) #define the variable...

Corona virus structure using Python turtle

 Python programming Python program to make a corona virus structure using turtle framework. import turtle # setting the turtle object trt = turtle.Turtle() # now setting the canvas or screen scr = turtle.Screen() #setting the bg color scr.bgcolor( 'black' ) #lets set to the black #setting the screeen/window title # making the turtle fast trt.speed( 0 ) # 0 means the fastest speed ... scr.title( 'Corona virus Structure' ) # now setting the turtle color trt.color( 'green' ) # lets make it green # now we have to make a loop to continuosly make the borders and structure # use for loop for x in range ( 210 ): if x in range ( 50 ): trt.hideturtle() else : trt.forward( 10 +x) #moving the turtle in forward direction .......... trt.left(x) # rotating the turtle in left at the angle of x =[1,2,3,4........., 210] # now closing the turtle movement and makin the screen stable turtle.done() Watch full video :

Unique password generator program

Generate Unique password program   #include<stdio.h> #include<stdlib.h> #include<time.h> int main() { int i,password,len; srand((unsigned int)time(NULL)); printf("\n\n\n\t\t\t ENTER THE PASSWORD LENGHT AND MUST BE GREATER THAN 5 : "); scanf("%d",&len); if(len>=5&&len<=20) { for(i=0;i<len;i++) { int k=rand()%128; if((k>=48&&k<=57)||(k>=65&&k<=90)||(k>=97&&k<=122)||(k>=35&&k<=37)||k==64) { printf("%c",k); } else { i--; } } printf("\n"); } else { printf("\n\t\t\t LENGTH SHOULD BE GREATER THAN 5 and equal or less than 20 !!! "); } return 0; } Video link : https://youtu.be/weQYMCiEIds

Program to find the ASCII value in C langauge

C program to find ASCII value #include<stdio.h> #include<string.h> main() {      int i,temp,x,y=1,binary=0;      char str[1000];      printf("\n\n\t\t\t ENTER THE SENTENCE : ");      gets(str);      i=0;      printf("\n\n\n\t\t\t ENCRYPTED ASCII CODE : "); while(str[i]!='\0')      {      printf(" %d",str[i]);      i++;      }      return 0; } Video link : https://youtu.be/2SfBV_nbehA

How to create Loading Animation in C language

 Make loading animation Using C programming language #include<stdio.h> #include<conio.h> #include<graphics.h> // header file for graphics functions #include<dos.h> int main() {        int gd=DETECT;         int gm,i,j,k,midx,midy; //variable to be used      initgraph(&gd,&gm,"C:\\Turboc3\\BGI"); //initializing and setting the path of graphics file      midx=getmaxx()/2; //getting center of x-axis      midy=getmaxy()/2; //getting center of y-axis for(j=1;j<10;j++)      {      for(i=2,k=340;i<340,k>2;i=i+10,k=k-10)      {      setcolor(j);      arc(midx,midy,0+i,40+i,40); // creating the upper arc      setcolor(j+1);      arc(midx,midy,50+k,80+k,40); // creating the lower arc  ...

Corona virus guidelines chart program in C language

C Program to create Amazing  Coronavirus guidelines Chart #include<graphics.h> #include<dos.h> #include<conio.h> void main() { int gd=DETECT,gm; initgraph(&gd,&gm,"C:\\Turboc3\\BGI"); int x,y,i; x=getmaxx()/2; y=getmaxy()/2; setbkcolor(0); for(i=0;i<20;i++){ //-------- rectangle ----------------- setcolor(i+2); rectangle(20,20,x*2-15,y*2-150); delay(600); rectangle(15,15,x*2-10,y*2-145); delay(400); //----------- heading ------------ setcolor(i+1); settextstyle(7,HORIZ_DIR,2); outtextxy(x-170,45, "-: CORONA VIRUS GUIDELINES :-"); line(x-180,73,x+200,73); delay(500); // ---------- points section ------------ setcolor(i); settextstyle(1,HORIZ_DIR,1); outtextxy(35,90,"1. STAY HOME. "); outtextxy(35,120,"2. REGULARLY WASH YOUR HANDS. "); outtextxy(35,150,"3. MAINTAIN SOCIAL DISTANCE AND AVOID PUBLIC GATHERING . "); outtextxy(35,180,"4. AVOID TOUCHING EYES,NOSE AND M...

Toss game program in C language

CODE FOR TOSS GAME  #include<stdio.h> #include<time.h> #include<stdlib.h>  // its a standard library header file main() { int number,guess; srand(time(NULL)); // this is the function to generate a random number between 0 and 1.. number=rand()%2;  // this is the actual operation for 1 and 0.. // if no. is even it gives 0 and 1 otherwise.. printf("\n \t ENTER 1 FOR TAIL AND 0 FOR HEAD : "); scanf("%d",&guess); printf(" \n THE RESULT OF THE TOSS IS :  "); // testing the condition for head or tail... if(number==0) printf(" head  \n !!!"); else printf("tail \n"); printf(" You guessed "); if(guess==0) printf("Head\n"); else printf("Tail \n"); if(number ==guess) printf(" hurray ! you won the toss !!!"); else printf(" bad luck !!\n Better luck next time : : "); } ...

Program to create pyramid in C language

C PROGRAM TO MAKE A RIGHT POINTED PYRAMID #include<stdio.h> main() { int i,j,k,row,count,temp; printf("\t ENTER THE NUMBER OF THE ROWS : "); scanf("%d",&row); for(i=1;i<=row;i++) { for(j=1;j<=i;j++) { printf("* "); } printf("\n"); } for(i=row-1;i>=1;i--) { for(j=i;j>=1;j--) { printf("* "); } printf("\n"); } } click here  for my youtube channel

Program to create X pattern in C language

C PROGRAM TO CREATE X PATTERN #include<stdio.h> main() {      int len,i,j,row;      printf("\n ENTER THE NUMBER OF THE ROWS : ");      scanf("%d",&row);      for(i=1;i<=row;i++)  // for loop for the rows ..      {           for(j=0;j<row;j++)   //for loop for the columns...           {           if(i==j||i+j==row -1) // this is the main logic for the required pattern..           {                printf("*");           }           else{                printf(" ");   // white space where it should be blank..          }  ...