Posts

PYTHON - "Basic Program"

🐎 PYTHON - "Basic Program" 🙌  1. Add two number and Input taken from keyboard Number1 = input("Enter the first number:") Number2 = input("Enter the second number:") Sum = float(Number1) + (Number2) print('sum of {0} and {1} is equal to {2}'.format(Number1,Number2,Sum)) Output: Enter the first number: 12 Enter the second number: 34 Sum of 12 and 34 is equal to 46 2. Swap two numbers by use third variable. a = input('Enter value of a: ') b = input('Enter value of b: ') temp = a a = b b = temp print('After swapping a: {}'.format(a)) print('After swapping b: {}'.format(b)) Output: Enter value of a: 43 Enter value of b: 22 After swapping a: 22 After swapping b: 43 3. Check ODD and EVEN number. num = int(input("Enter any number: ")) if (num % 2)==0:     print("{0} is Even".format(num)) else:     print("{0} is Odd".format(num)) Output:...

Useful SQL commands

Useful  SQL commands Here I used Table Name as " TechConnect " for all Query. 1. To Create Table:- > Create Table TechConnect    (Name Varchar2(30), College_name Varchar2(30), Roll_no Number(15), D.O.B Date, Height      Number(4,2)); 2. To Insert Data Into Table:-   > Insert into  TechConnect     Values('Ram Kumar',  'ABCDE', 123001, '11-Jan-1994', 7.5); 3. To see items of table:-   > Desc  TechConnect; 4. To show whole data of a Table:-   > Select * from  TechConnect; 5. To select any Column     > Select Name, College_name, D.O.B from  TechConnect; 6. To save :-       > Commit: 7. To Delete From Table (Row / Tuple):-      > Delete from  TechConnect where name = 'Ram Kumar'; 8. To Add extra Column in exist Table :-   > Alter table  TechConnect add (Dept Varc...

Bubble Sorting In c Language

Keep In Mind:- 1. If there are N number of unsorted elements then N-1 number of iteration. 2. Start comparison from left to right. 3. Do comparison only with adjacent  elements (left to right). 4. T(n) = O(n2)    (worst case) 5. Best case : O(n) 6. Average case : O(n2). Basic Idea:- Given elements in an array: - 2,4,1,5,3,7 . Step 1- Choose 2 and compare with 4  =  2,4  (2<4 no swapping).                    "     4   "        "           "     1=   2,1,4  (4>1  swaping done)                     "     4   "         "         "     5=   2,1,4,5  (4<5  no swapping)                     "      5   "   ...

Insertion Sorting in C Language.

Keep in mind:- 1. Take one element at a time for sorting (i.e. one by one). 2.  Useful for sorting small data set (not used this sorting for large data sets). 3. Time complexity is Worst case =O(n2).. 4. Time complexity depend on number of compare + number of movement. 5. Sometime calls as In-Place Algorithm. 6. It may be ascending or descending orders. Basic Idea:- If you have 4 cards (numbering 4,3,7,1).           Before sorting :- 4,3,7,1.            After sorting :-   1,3,4,7. Process:- 1. Take first card (i.e. 4). 2.  Take another card 3 compare with first one, we got 4>3. So move 3 before 4. 3. Take 3rd card 7 compare with previous one 4, we got 7>4. So no need to sorting, 4. Take 4th card 1 compare with previous one 7, we got 1<7. So move one place left, again 1<4 move      left, again 1<3 move left. Therefore 1 comes at their position. Sorting Done. Alg...

FORMAT OR HARD RESET YOUR MOBILES.

Image
                           HARD RESETTING PROCESS                          Today i am going to show  you. The process of   FORMATING/ HARD RESETTING  of your cell phones. STEPS:=== IF YOUR MOBILE HAVE HOME KEY  OUTSIDE OF DISPLAY. Switched OFF your mobile. Press Volume UP Key, Power Button and Home key all at once. Wait for a minute or seconds. You got a black screen with android logo. After a Few seconds you Got some option. Use volume key for select "FORMAT OR WIPE"   option and Power key for DONE. Then your process will be started. Now, Your mobile will be automatically started with newest look. IF YOUR MOBILE HAVE   NOT HOME KEY   OUTSIDE OF DISPLAY. Switched OFF your mobile. Press Volume UP Key and Power Button  both at once. Wait for a minute or seconds. You got a bla...

Steps for Oracle XE Installation With Scott Schema on Windows OS

Image
STEPS ARE :--- Step 1:    Install OracleXEUniv.exe              ( Remember the Password , for say “tiger” which is  required at the time of installation) Step 2:      Copy DATA.SQL file and paste it any drive (say :E drive ) Step 3:     Go the SQL Command Line Prompt                  START > RUN SQL COMMAND LINE   Step 4:      SQL Prompt will come .                 SQL> conn system/password@xe Step 5:    SQL> @ E:\DATA.SQL Step 6:  >  Working through SQl Command Prompt.                  Now connect with user name SCOTT and password TIGER. Oracle Service Name is XE. Step 7:  >  Connect through Browser                  C...

CONVERSION INTO BINARY FROM DECIMAL, HEXA, OCTAL NUMBERS

HEY I AM GOING TO SHOW SOME IDEAS ABOUT BINARY  CONVERSION 1. DECIMAL TO BINARY. LET US TAKE EXAMPLE:-  (a) 5 IN DECIMAL  (in decimal digits <=9).                                                        Step1. Devide 5 from 2 then we get 2 as remainder and 1 as quot.                                                        Step2. Devide 2 (i.e remainder of above) from 2 then we get 1 as                                                                       remainder and 0 as quot.       ...