-->

Learning Python 3.8

click the program to learn python commands/programs.
--------------------------------------------------------------------------

1. Python basic programs:- It contains Python basic programs. Like input,output,variables.


2. Python controls structures:-
                       It contains programs related to if,if,if else,switch,nested if, loop,nested loop etc.

Python list programs: 
                                  It contains programs using concept of list. Here list means a collection of data which is ordered and changeable. It allows duplicate( same data entry or storage) members.

Python tuple programs:-
             Here tuple means ordered and unchangeable data. It also allows duplicate/same data storage.

Python set program:
                         It contains programs in which are data are unordered and unindexed. It does not permit duplicate data.

Python Dictionary programs:-
                              It conatins programs using concept dictionary where data are un ordered,indexed and changeable.It does not permit duplicate members.

Python Lambda programs:-


Python array programs:
                                  It contains programs related to array.

4.Python functions:
                                 It contains programs related to functions and their uses.



Python with OOP concept:

      Python with class and object programs:


     Python with inheritance:-

    Python with iterators:-

    Python with scopes:


   Python with scopes:


   Python with modules:-


   Python with dates:

  Python with JSON:-

 Python with Regex:-


 Python with PIP:-


 Python with try..except:-








how to mount qbasic with dosbox to run on windows 10/7 etc.

steps;-
-----------
how to automate the dosbox for a program.
---------------------------------------
1. download the dosbox
2.install it
after installation
 1. goto c: drive
 2.open the folder programfiles(x86)
 3.open the file dosbox 0.74-2 options by clicking twice
    do not go for right click and then open with
 4.after opening.
        1.scrool down and goto end part/line
        2. put the code(u r supposed to have qb folder in c: drive)
     
       mount c c:\qb45
       c:\qb
    3. save it
------------------

or
click for video

how to mount turboc++ with dosbox to run on windows 10/7

steps
-:-

how to automate the dosbox for a program.
---------------------------------------
1. download the dosbox
2.install it
after installation
 1. goto c: drive
 2.open the folder programfiles(x86)
 3.open the file dosbox 0.74-2 options by clicking twice
    do not go for right click and then open with
 4.after opening.
        scrool down and goto end part/line
        put the code(u r supposed to have 'tc' folder in c: drive)
     
       mount c c:\tc
       c:\tc
------------------

click fo video


program to get co-ordinate of clicked button of mouse

using turboc++
------------------------------------------------------------------------------
//program to display co-ordinate of x and y on click
#include <dos.h>
#include<stdio.h>
#include<conio.h>
union REGS in_put, out_put;// input and output variables stored in union
  //input for signal detection;output for screen display
void mouse_detected ()
{
in_put.x.ax = 0;// ax is register used for mouse
int86 (0X33,&in_put,&out_put);   //invokes interrupt using 0X33; for mouse, it is 0X33
if (out_put.x.ax == 0)    //condition testing
printf("\nMouse Failed To Initialize");
else
printf ("\nMouse was Succesfully Initialized");
       //initialization on screen
}

void show_mouse()
{
 in_put.x.ax = 1;   //1 is to display mouse
 int86(0X33,&in_put,&out_put); //interrupt invoked
}

void mouse_cord()
{
while(!kbhit())    //until a keystroke is pressed
{
int x,y;
in_put.x.ax=3;    //3 is for co-ordinate value
 int86 (0X33,&in_put,&out_put);
 x = out_put.x.cx;  //gets x-value
 y = out_put.x.dx;  //gets y value

 if (out_put.x.bx == 1)
   printf ("\nLeft || X - %d  Y - %d", x, y);//x and y value on left click

 else if (out_put.x.bx == 2) //x and y value on right click
   printf ("\nRight:x-%d,y-%d",x,y);
 else if (out_put.x.bx == 3)//x and y value on wheel click
   printf ("\nMiddle");
   delay (200); // Otherwise due to quick computer response 100s of words will get print
}
}

int main ()
{        clrscr();
mouse_detected ();//calling of function
show_mouse();//calling of function
mouse_cord();
getch ();
return 0;
}


program to detect click of button of mouse

using turboc++
-----------------------------------------------------------------------------------------------------
//program to detect button on click
#include <dos.h>
#include<stdio.h>
#include<conio.h>
union REGS in_put, out_put;// input and output variables stored in union
  //input for signal detection;output for screen display
void mouse_detected ()
{
in_put.x.ax = 0;// ax is register used for mouse
int86 (0X33,&in_put,&out_put);   //invokes interrupt using 0X33; for mouse, it is 0X33
if (out_put.x.ax == 0)    //condition testing
printf("\nMouse Failed To Initialize");
else
printf ("\nMouse was Succesfully Initialized");
       //initialization on screen
}
void show_mouse()
{
 in_put.x.ax = 1;   //1 is to display mouse
 int86(0X33,&in_put,&out_put); //interrupt invoked
}
void mouse_bttn()
{
while(!kbhit())    //until a keystroke is pressed
{
int x,y;
in_put.x.ax=3;    //3 is for co-ordinate value
 int86 (0X33,&in_put,&out_put);

 if (out_put.x.bx == 1)     //1 for left click
   printf ("\nLeft clicked");

 else if (out_put.x.bx == 2) //2 for right click
   printf ("\nRight clicked");
 else if (out_put.x.bx == 3)//3 for wheel click
   printf ("\nMiddle clicked");
   delay (200); // Otherwise due to quick computer response 100s of words will get print
}
}
int main ()
{
mouse_detected ();//calling of function
show_mouse();//calling of function
mouse_bttn();
getch ();
return 0;
}


Program to show pointer of mouse(text and graphics mode)

using turboc++
-----------------------------------------------------------------
//program to activate/detection mouse
#include <dos.h>
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
union REGS in_put, out_put;// input and output variables stored in union
  //input for signal detection;output for screen display
void showmouse()

{
 //in_put.x.ax = 1;// taking value 1 for display of mouse on screen  in text mode
 //int86 (0X33,&in_put,&out_put);//invoking interrupt
 //if we want to display mouse in graphics mode then
 //we put following code
 int gdriver=DETECT,gmode;  //graphics detection
 initgraph(&gdriver,&gmode,"c:\\tc\\bgi"); //graphics initialization
 in_put.x.ax = 1;// ax is register used for mouse .1 is used to display mouse
 int86 (0X33,&in_put,&out_put);   //invokes interrupt using 0X33; for mouse, it is 0X33
 getch();
 closegraph();   //graphics closing.
}
int main ()
{

showmouse();//calling of function
getch ();
return 0;
}

//note:If you want to use mouse in text mode, uncomment the commented lines
//in showmouse() function.
//we can also put mouse initialization part here.

program to activate /initialize mouse.

using turboc++
-------------------------------------------------
//program to activate/detection mouse
#include <dos.h>
#include<stdio.h>
#include<conio.h>
union REGS in_put, out_put;// input and output variables stored in union
  //input for signal detection;output for screen display
void mouse_detected ()
{
in_put.x.ax = 0;// ax is register used for mouse; 'x' is member of reg.
int86 (0X33,&in_put,&out_put);   //invokes interrupt using 0X33; for mouse, it is 0X33
if (out_put.x.ax == 0)    //condition testing
printf("\nMouse Failed To Initialize");
else
printf ("\nMouse was Succesfully Initialized");
       //initialization on screen
}
int main ()
{
mouse_detected ();//calling of function
getch ();
return 0;
}