Monday, 5 July 2021

WHY Software Developer ?

 


#2 Interesting Facts On PYTHON !!

 


# 1 Interesting Facts Of PYTHON !!

 


Solved Assignments Class 11 Ch-3

 

CLASS -11  COMPUTER SCIENCE

               CHAPTER- 3  DATA  HANDLING 


Assignments 

Type -A  Questions :

1. What are data types ? How are they important ?
Ans . Data types refer to different types of data that can be used in python language . 
They are important because they can be considered as backbone of programming as without them we will not be able to give single command in python.

2 . How many integer types are supported in python ? Name them .
Ans . There are 2 types of integers i.e. 
            --> Integers (signed)
            --> Booleans

3 . How are these numbers different from one another ?   33 , 33.0 , 33j , 33+j
Ans . 33 is an integer , 33.0 is floating number , 33j and 33+j both are complex numbers.

4 . The complex numbers have two parts : real and imaginary . In which data type are real and imaginary parts represented ?
Ans . Real and imaginary parts are represented in a complex number .

5 . How many string types does Python support ? How are they different from one another ?
Ans .  There are 2 types of strings i.e. single line string and multi line string which are supported in Python. 
Single line string is that string which is written or typed in one single line using single or double quotes while the multi line string is a type of string that are written or typed in multiple lines with the use of triple quotes.

6 . What will following code print ?
      str1=' ' ' Hell
                     o ' ' '
      str2= ' ' ' Hell\
                     o ' ' '
      print (len(str1)>len(str2))
Ans . True

7 . What are immutable and mutable data types ? List immutable and mutable types in python .
Ans . Immutable data types are those data types which cannot be changed while the mutable data types are those that can be changed after it's declaration.
Immutable data types - Tuple , strings , etc.
Mutable data types - List , Dictionaries , sets, etc.

8 . What are three internal key attributes of value variable in Python? Explain with example .
Ans . The 3 key attributes are :
          ---> The type of an object
          ---> The value of an object
          ---> The id of an object
Example :    >>>a=10
                  >>>print(a)
                  >>> 10
                  >>>print(id(a))
                  >>>30899132
Here in this the type  of an object i.e a is integer type , the value of it is 10 and the id of object a is 30899132.

9 . Is it is it true that if two objects return True for is operator they will also return true for == operator ?
Ans . No, this is not always true because the is operator uses reference point to compare but the == operator uses the value stored in a variable to compare . Thus always it might not happen that for any two variables having same value might be having same reference point.

10 . Are these values equal ? Why / why not ?
Ans . 
i) 20 and 20.0  ---> No , because one is integer while the other is float value.
ii) 20 and int(20) ---> Yes,because both these values are of integer type.
iii) str(20) and str(20.0) ---> No , because both string values are different first is '20' while second is '20.0' 
iv) 'a' and "a" ---> Yes , because they both are pf string data types and have same value i.e a although represented in two different ways.

11 . What is an atom ? What is an expression ?
Ans . An atom is something that has a value . Identifiers , literals , strings , lists, tuples , sets, dictionary , etc. are all atoms .
An expression in Python is any valid combination of operators and atoms. An expression is composed of one or more operations.

12 . What is difference between implicit type conversion and explicit type conversion ?
Ans .  An implicit type conversion is that which is done in backside of coding and is done by python compiler or interpretor while the explicit type conversion is that in which user by using some conversion functions convert the data type by its own.

13 . Two objects (say a and b) when compared using == , return true but Python  gives false when compared using is operator why ?
Ans . This might be due to different reference points to which the variables a and b might be pointing although having same value .

14 . Given str1="Hello" , what will be value of ? 
Ans . 
a) str1[0] ---> "H"
b) str[1] ---> "e"
c) str[-5] ---> "H"
d) str[-4] ---> "e"
e) str[5] ---> error

15 . If you give str1='Hello' , whiy does the below code give error then ?
str1[2]='p'
Ans . This is so because we know that in python strings are immutable data types i.e. after its declaration there value can't be changed . Due to this fact only there occurs error when we write the above code .

16 . What will the result given by following ?
Ans .   a) type(6+3) ---> Integer
          b) type(6-3) ---> Integer 
          c) type(6*3) ---> Float
          d) type(6/3) ---> Float
          e) type(6//3) ---> Float
          f) type(6%3)---> Float

17 . What are augmented assignment operators ? How are they useful ?
Ans . They are the operators which enable us to combine any two or more operators and to code them in shorthand . 
They are useful as they minimise the code .

18 . Differentiate between (555/222)*2 and (555.0/222)*2 .
Ans . Although the output of the above two commands will be same i.e. a float value but there is slight difference in the input command and it's processing . In the first command all the operands are integer while in the second command one of them i.e. 555.0 is a float value .

19 . Given three Boolean variables a, b, c as : a=False , b= True , c=False.
Evaluate the following below expressions :
Ans .    a) b and c ---> False
           b) b or c ---> True
           c) not a and b ---> True 
           d) (a and b ) or not c ---> True
           e) not b and not(a or) ----> False
           f) not((not b or not a) and c) or a --->True
   
20 . What would the following code fragments result in ? Given X=3 .
Ans .    a). 1<X ---> True
           b)   X>=4 ---> False
           c) X==3 ---> True
           d) X==3.0 --->  True
            e) 'Hello'=="Hello"  ---> True
            f)  "Hello" > "hello" ---> False
            g) 4/2==2.0 --> True
            h) 4/2==2 ---> True 
            i) X<7 and 4> 5 ---> False

21 . Write the following expression in python :
Ans .  a) ⅓b²h  = (1/3)(b*2)*h
         b) Ο€r²h = (math.pi)(r*2)*h
         c) ⅓Ο€r²h = (1/3)math.pi(r**2)*h
         d) d=√((x2-x1)²+(y2-y1)²) => d=math.sqrt((x2-x1)*2+(y2-y1)*2)
        e) (x-h)²+(y-k)²=r²  =>  ((x-h)*2)+((y-k)2) = (r*2)
        f) X=(-b+√(b²-4ac))/2a   => X=(-b+math.sqrt((b**2)-4*a*c))/(2*a)
        g)a³ x a⁶= a^(3+6)   => (a*3)+(a6)=a*(3+6)
        h) (a³)² = a⁶   =>  (a*3)2 = a*6
        i) a³/a² = a³–²  => (a*3)/(a2) = a*(3-2)
       j) a–² = 1/a²   =>   (a*(-2)) = 1/(a*2)

22. int('a') produces error . Why ?
Ans . Because we can't convert a string data type to integer unless it has some numeral value stored in it. 

23 . int('a') produces error but the following code having int('a') in it , does not return error . Why ?
Len('a')+2 or int('a') 
Ans . In the above expression the code is a Boolean expression thus when error occurs in int('a') it give the value as False and proceeds to the addition due to or operator. 

24 . Write expression to convert the values 17 , Len('ab') to -
Ans .    a) integer ---> by using int( ) function
           b) string ---> by using str( ) function
           c) Boolean values ---> by using bool( ) function

25 . Evaluate :
Ans . a) 22.0/7.0 - 22/7 = 0
         b) 22.0/7.0 - int(22.0/7.0) = 0
         c) 22/7 - int(22.0)/7 = 0
Each of the above code will give output --> 0 .This is so because in case a the output of both 22.0/7.0 and 22/7 gives the same output and thus their subtraction result in 0.
Similar is the case in b and c .

26 . Evaluate and justify : 
Ans . a) false and None --->   error as false is not defined
         b) 0 and None --->  0
        c) True and None ---> None
        d) None and None ---> None

27) Evaluate :
Ans .   a) 0 or None and "or" = None
           b) 1 or None and 'a' or 'b' = 1
           c) False and 23 = False
           d) 23 and False = False
           e) not(1==1 and 0!=1) = False
           f) 'abc'=='Abc' and not(2==3 or 3==4) = False
           g) (False and 1==1 or not True or 1==1 and False or 0==0) = True

28) Evaluate the following for each expression, that is successfully evaluated determine its value and type for  unsuccessful expression state the reason :
Ans . a) Len('hello')==25/5 or 20/10 --> True
          b) 3<5 or 50/(5-(3+2)) ---> True
          c) 50/(5-(3+2)) or 3<5 ---> Error due to division by 0.
          d)2*(2*(Len("O1"))) ---> 8

29) Write an expression that uses exactly 3 arithmetic operators with integer literals and produces  result as 99 .
Ans . 9/3*11+33

30) Add parentheses to the following expression  to make the order of evaluation more clear .
Ans . (y%4)==0 and ((y%100)!=0) or ((y%400)==0)

Type - B  Application Base Questions :

Ans 1 . 
a) bool(0) = False. -->  It gives the Boolean value of zero which False . (0= False and 1= True)
b) bool (str(0)) =True. --> It gives True because the str( ) function makes a string '0' and thus the Boolean value gives True.

Ans 2 .  False 

Ans 3 . This is so because we know that the division and multiplication operator always give output in float point form .

Ans 4 .   a)  3     3               b) True
                                              False

Ans 5 .  True
               False
              True
              False

Ans 6 .    -2 
                  81

Ans 7 . Error will be produced when we run this code because in the first line of code value has not been assigned to b and c .

Ans 8 .    4.6      7.4
                 13.8
                 21.0

Ans 9 .   4.0

Ans 10 .  x , y = 4 , 8 
                  z = (x / y * y ) - x
                 print ( z )

Ans 11 . Changed expression :  3  +  10/0

Ans 12 .    4       4
                    1       3

Ans 13 .    s=''12345''
                   sum=0
                  for k in s :
                       sum+= int(k)
                 print(sum)

Ans 14 .    True
                    False
                    True
                   True
                  True 
                 False

Ans 15 .  ( underlined red lines are having errors )
a)  name = ''HariT''
     print ( name )
     name [ 2 ] = ''R''
     print ( name )

b)  a = bool ( 0 )
     b =  bool ( 1 )
    print ( a==false )
   print ( b==true )

c)   print ( type ( int ( ''123'' ) ) )
     print ( type ( int ( '''Hello'' ) ) )
    print ( type ( str ( ''123.0'' ) ) )

d)   pi = 3.14
      print ( type ( pi ) )
     print ( type ( ''3.14'' ) )
    print ( type ( float ( ''3.14'' ) ) 
   print ( type ( float ( ''three point one four ' ) ) 

e)   print ( ''Hello'' + 2 )
      print ( ''Hello'' + ''2'' )
     print ( ''Hello'' * 2 ) 

f)   print ( ''Hello''  / 2)
     print ( ''Hello''  /   2 ) 
      

              

                 

Saturday, 3 July 2021

Python Course Week 1

 Python  Learning  Course  Week   #1


πŸ‘‹Hi ! a very warm welcome to the beloved readers of this blog . The sole purpose of this blog is to ensure equal education granting to each and every reader despite of knowing who he/she is ? This is the Complete Python Course based on the CBSE pattern that is to be provided to readers without any money . This course will be reader-friendly as a reader can learn the language with his/her own pace and anywhere where is comfortable . 

So , in this view here this is the first week course that any learner should finish within one week so as to ensure constant and appreciable learning . This blog consists of two chapter pdf that is to be finished reading and understanding within one week . πŸ˜…Hey , Don't Worry ! No timer⏰ is there for it but the average time one might need to learn this part is one week duration thus mentioned there to ensure simple time management by reader . Although one can learn the language in his/her own pace as it is meant to be .

πŸ€—So , let's get started guys . Download the first week course from below πŸ‘‡

Download Lesson 1

Download Lesson 2








Friday, 2 July 2021

Solved Assignments Class 11 Ch-2

 

CLASS -11  COMPUTER SCIENCE

        CHAPTER-2  PYTHON  FUNDAMENTALS


Assignments 

Type -A  Questions :

1. What are tokens in Python ?How many types of tokens are allowed in Python ? 
Ans . The smallest individual unit in a program is known as Token or Lexical unit.
There are 5 types of tokens in Python : 1) Keywords 2) Identifiers 3) Literals 4) operators 5) Punctuators 

2. How are Keywords different from identifier ? 
Ans . An identifier is the name used to store some variable value thus it has no special meaning in a program but a keyword is a word that has some special meaning in Python and cannot be used to store some value.

3 . What are Literals ?  How many types of Literals are allowed in Python  ?
Ans . Literals are data items that have a fixed value . The types of Literals allowed in Python are - 1)String Literal. 2) Numeric Literal 3) Boolean Literal 4)Special Literal "None" 5)Literal collection

4 . Can no graphic characters be used in Python ? Give example to support your answer.
Ans . Yes , we definitely can use nongraphic characters( those characters that can't be typed directly from keyboard ) in Python . Some  of the nongraphic characters that are supported by Python are- 
\\   It does the work of a backslash 
\'    It does the work of single quotes
\"   It does the work of double quotes  , etc.

5 .How are floating constants represented in Python ? Give example .
Ans . Floating constants are of two types  1) Fractional form   2) Exponential form .
The Fractional form is represented with decimal eg.   .45 is represented as 0.45
The Exponential form is represented with the  value raised after the letter ' E '  eg . 2² will be represented as 2 E2 .

6 .How are string Literals represented and implemented in Python ? 
Ans . String Literals in Python is represented in single or double quotes . Their implementation in Python is that when we specify a string value to any variable we need to provide it in single or double quotes always . And if we want to convert any data type into string data type then we should use  string( ) function . 

7 .Which of these is not a legal Numeric type in Python ? a ) int   b ) float   c ) decimal .
Ans . c ) decimal 

8 . Which argument  of print( ) would you set for :
i ) changing the default separator (space) --> print (< to print > , end='<new separator >')

9 . What are operators ? What is their function ? Give example of some unary and binary operators .
Ans . Operators are tokens that trigger some operation on specified variables .
They are used to do some computaional operations (addition , subtraction , multiplication ,etc.) on variable .
Some of the unary operators are -
- unary plus (+)  
- unary minus (-)  
- bitwise complement (~)
- logical complement (not)
Some of the binary operators are -
- arithmetic operators ( + , - , * , etc. )
- bitwise operators ( & , ^ , | )
- shift operators ( << , >> )
- etc.

10 . What is an expression and a statement ?
Ans . An expression in any legal combination of symbols that represent certain value .
A statement is an instruction given in a program  that does some work in program .

11 . What all components can a Python program contain ? 
Ans . The various components of a Python program are - expression , statements , comments , function , block and indentation .

12 . What do you understand by block/code block/ suite in Python ?
Ans . A group of statements which are part of another statement or a function are called block/suite/block code .

13 . What is the role of indentation in Python ?
Ans . Indentations are the blank spaces that are provided before a code to create a block code .

14 . What are variables ? How are they important for a program ?
Ans . Variables are the name that stores some value in a program. They are important in a program because they are used to in almost every section of code from operating on them to printing in output .

15 . What do you understand by undefined variable in Python ?
Ans . Any variable which is not specified by any value in the program is called undefined variable in Python .

16 . What is dynamic typing feature in Python ?
Ans . Any variable pointing to a value can be made to point to some other value of different type in the same code . This facility is called dynamic typing in Python .

17 . What would the following code do : x=y=7 
Ans . This code will make the variables x and y to point to integer 7 .

18.  What is error in this code : x , y = 7
Ans . The error is that we need to provide one more value after 7 separating by ' , '. 

19 . Following code is creating some problem X=0281 . Find the problem .
Ans .  Here X=0281 will create problem because any number should not start with 0 but some other digit except it .

20 . " Comments are useful and easy way to enhance readability and understanndibility of a program . " Elaborate with examples .
Ans . Surely comments enable one to understand the code more easily . 
Example - 
a program to print the table of number 5 is as follows :
for I in range(1,11):
      print(5*I)    
                    #will print multiplication of 5and I
Here in this program the comment will acknowledge reader about the working of code and thus it becomes easy to understand the program.

Type B Application based questions :

Ans 1-  b , d , f , g ,  h

Ans 2- underlined red coloured code are wrongπŸ‘‡πŸ»
i)   temperature=90
     print  temperature

ii)  a=30
     b=a+b
     print(a And b)

iii)  a,b,c = 2,8,9
      print(a,b,c)
      c,b,a=a,b,c
      print(a;b;c)

iv)  x=24
      4=X

v)  print(''x=" x)

vi)  else=21-5 

Ans  3-
i)   15
     13 , 22

ii)   2, 3, 6
      11, 3, 33

iii)   7, 49

Ans 4-

i)  Indentation error

ii)  String + Integer concatenation error

iii)  String Division with integer error 

Ans 5-   20 , 41

Ans 6-   10 , 20

Ans 7-   a)   12 , 6 , 24                           b)  25

Ans 8-   ''a , b , c : 10 , 20 , 30 "
              ''p , q , r : 25 , 13 , 16 "

Ans 9-    a)   value to X not provided                b)  assignment operation not allowed in print statement 
             c)   String  Division with integer error

Ans 10-   Wrong input provided i.e. String not an integer

Ans 11-   corrected code  πŸ‘‡:
               name=input(''What is your name ? '")
               print(''Hi", name , '','' ,end=''  '')
               print(''How are you doing ? '')

Ans 12-   c = int(input(''Enter your class ''))
               print('''Last year you were in class '', c-1)   

Ans 13-  a)  integer      b)  integer        c)   error           d)  string           e)   float          f)  integer
               g)  float         h)  float            i)   float

Ans 14-   a) One                                 b)  hello One

Ans 15-  a )                                         b)       Hola
                  Hola

Ans 16-  It is so because Octal data type does not have integer 8 in its any representation .

Ans 17-  4 , 6 , 8

Ans 18-   No, the id number will not be same for all values of n . It is so because the n is only a refering variable which refers to the different values assigned to it every time . 

Ans 19-  The error occurs because we are not allowed to assign value in print( ) function .

Ans 20-   The amount of seconds  93784 .

                πŸ‘‰MORE MATERIALS TO BE UPLOADED STAY TUNEDπŸ‘ˆ
             

Wednesday, 30 June 2021

Solved Assignments Class 11 Ch-1

 

CLASS -11  COMPUTER SCIENCE

    CHAPTER-1  GETTING STARTED WITH PYTHON


Assignments 

  • When  was  python  released  ?                                                                                      Ans. 1991

  • Who  was  python's  developer  and  which  two  languages   contributed  to it  as  a  programming  language  ?                                                                                           Ans.  Guido  Van  Russom is  the  developer  of python .                                                       The  two  languages  were :    i)  ABC language ( basic language )                                                                               ii)  Modula - 3

  • What is cross - platform software  ?                                                                              Ans . Those softwares that can run equally on variety of platforms like- Windows , Linux , Macintosh , etc.

  • What are the advantages of python programming language ?                                    Ans. Following are the benefits of using this language -                                                                       1 . Easy to use                          2. Expressive Language                                                 3 . Interpreted language         4 . It is complete in itself                                              5 . Cross- platform language    6 . Free and open source                                              7 . Variety of usage 

  • What are limitations of python programming language ?                                    Ans. Following are the disadvantages of using this language -                                                      1 . Slow language                        2. Lesser libraries than C , Java , Pearl                   3 . Not strong on type binding     4 . Not easily convertible 

  • In how many different ways can you work in python ?                                                 Ans . We can work in two ways i.e.  INTERACTIVE MODE  &  SCRIPT MODE in python .

  • What are advantages and disadvantages of working in Interactive Mode ?               Ans . Advantages :  It is very useful for testing a code and at the time of                                                    debugging .                                                                              Disadvantages  : It does not save the commands and the output comes sandwiched with  the input commands .

  •         
  • What are advantages and disadvantages of working in Script Mode ?                       Ans . Advantages :  It is very useful to save the code in the form of a program                                          and to run it later   on to get complete output .                        Disadvantages  : It is not as fast as interactive mode and is hectic to test code at the time of  debugging .                                                                                                                                                                                                                                                                                                                                                                                                                                               πŸ‘‰MORE MATERIALS TO BE UPLOADED STAY TUNEDπŸ‘ˆ

Saturday, 26 June 2021

CLASS 11 CS CHAPTER 22

 

CLASS -11  COMPUTER  SCIENCE

  CHAPTER- 22  ONLINE ACCESS & COMPUTER  SECURITY


πŸ””To download textbook pdf click on the ''DOWNLOAD'' button below -


NOTES FOR COMPLETE UNDERSTANDING -


  • Threats to Computer Security :
  • A Threat is a potential violation of security. 
  • When a threat is actually executed, it becomes attack. 
  • Those who executes such actions, or cause them to be executed are called attackers. 

  • Some common threats the average computer user faces everyday are:
  1. Viruses 
  2. Worms
  3. Trojans 
  4. Spyware
  5. Adware 
  6. Spamming 
  7. PC Intrusion
  8. Denial of Service 
  9. Sweeping 
  10. Password Guessing 
  11. Phishing 
  • They are also known as Malware that harms your computer.

  • Computer Viruses :
  • Computer Virus are malicious code/programs that cause damage to data and files on a system.
  • Virus can attack any part of a computer’s software such as boot sector, operating system, system areas, files, applications-program-macro etc. 
  • Two other similar programs also cause virus like effects. These are- 
  • Worms: a worm is a self replicating program which eats up the entire disk space or memory. A worm keeps on creating its copies until all the disk space or memory is filled. 
  • Trojans Horses : A destructive program that masquerades as a benign application. Unlike viruses, Trojan horses do not replicate themselves but they can be just as destructive. One of the most insidious types of Trojan horse is a program that claims to rid your computer of viruses but instead introduces viruses onto your computer 

  • Damages caused by Viruses:                                                                                                                                                 – Damage or Delete files.                                                                                                 – Slow down your computer.                                                                                           – Invade your email programs.

  • Spyware :
  • Spyware is a software which is installed on your computer to spy on your activities and report this data to people willing to pay for it. 
  • Spyware mostly get installed on your PC without your consent. 
  • Roughly 32% computers of the world are infected with some type of Malware. 
  • Damages caused by Spyware : 
  1. Compromises your data, computing habits and identity. 
  2. Alter PC settings. 
  3. Slow down your PC

  • Adware : 
  • These are the programs that deliver unwanted ads to your computer. 
  • They consume your network bandwidth. Adware is similar to spyware. 
  • You have to be very careful while installing a software.
  • Damages caused by Adware:                                           
  1. Adware tracks your information just like spyware. 
  2. Displays arrays of annoying advertising.
  3. Slow down your PC.

  • Spamming :
  • Spamming refers to the sending of bulk-mail by an identified or unidentified source.in malicious form, the attacker keeps on sending bulk mail until the mail-server runs out of disk space. 
  • Damages caused by Spamming-
  1. Spam reduces productivity. 
  2. Spam eats up your time.
  3. Spam can lead to worse things.

  • PC Intrusion :
  • Every PC connected to the internet is a potential target for hackers. PC intrusion can occur in any of the following form.
  • Sweeper Attack : This is another malicious program used by hackers which sweeps all the data from the system. 
  • Denial of Services: This eats up all the resources of the system and the system come to a halt. 
  • Password Guessing: Most hackers crack or guess passwords of system accounts and gain entry into remote computer systems.

  • Eavesdropping :
  • Unauthorized monitoring of other people's communications is called Eavesdropping. 
  • Eavesdropping can be carried out through all communication devices and media of today-telephone, emails, messaging, other internet services.
  • To prevent this, email messages have to be encrypted and digital signature are also effective. 

  • Phishing and Pharming 
  • In Phishing, an imposter uses an authentic looking e-mail or website to trick recipients into giving out sensitive personal information which may later used for cyber crimes and frauds. 
  • Pharming is an attack in which a hacker attempts to redirect a website’s traffic to another, bogus website. Even if the URL is correct, it can still be redirect to a fake website.

  • Cookies :
  • A Cookie is a small piece of data sent from a website and stored in a user’s web browser. Some cookies disappears after user closes his browser while others, know as tracking cookies, remain saved and load the next time user visits the same website. 
  • These cookies help track user’s browsing sessions and load information faster, but create some security and privacy concerns as well. These security and privacy concerns are-
  1. Session Data : when you visit a website regularly, you may not have to enter your user name and password to get in because the information is being pulled from a tracking cookie. If somebody found out the encryption key and acquired your cookies, he could discover your passwords. 
  2. Tracking Information : when you visit certain websites with advertisements, those ads create cookie that store and track your online patterns.
  3. Public Computers : when you work on a public computer in a similar manner as you work on personal computer, the people who have access to those computer may access your information also.

  • Solutions to Computer Security Threat :
  • The entire computer security is based on a system of actions and safeguards which have been categorized in two ways-
  1. Active Protection : It includes installing and using an antivirus that have internet security also which shows protection against threats such as viruses, spyware and PC intrusion. 
  2. Preventive Measures : Even though security programs may actively detect and eliminate any threats your PC encounters, you should always help to prevent these issues from ever arising

  • Solutions to Virus, Adware and Spyware :
  • Active Protection : 
  1. Use Anti-Virus and Anti-Spyware. 
  2. Download updates regularly.
  3. Run frequent full-system scans.
  • Preventive Measure : 
  1. Keep your system up-to-date. 
  2. Use caution when downloading files on the Internet. 
  3. Be careful with email. 
  4. Disable cookies, if possible.

  • Solutions to Spam and Eavesdropping :
  • Active Protection : 
  1. Use Anti-Virus. 
  2. Update your Anti-Virus regularly.
  • Preventive Measure : 
  1. Keep your email address private. 
  2. Use encryption in emails. 
  3. Be careful with E-mails. 
  4. Install Internet security services.

  • Solution to PC intrusion :
  • Active Protection : 
  1. Authorization 
  2. Authentication 
  3. Firewall
  • Preventive Measure : 
  1. Use Proper File Access Permission. 
  2. Disconnect from internet when away.

  • Solutions to Phishing and pharming attack :
  • Active Protection : 
  1. Take the computer offline. 
  2. Backup all files on the hard drive.
  3. List the information given to Phishing scammers. 
  4. Run Antivirus software. 
  5. Contact credit agencies to report any possibilities of identity theft.
  • Preventive Measure : 
  1. Don’t open emails from unknown sources. 
  2. When in doubt, do not click.

  • Firewall :
  • An Internet Firewall is a device or a software that is designed to protect your computer from data and viruses that you do not want. 
  • A firewall is so called because of the real firewalls used to secure buildings.

  • Software Firewall: 
  • A software firewall is a special type of software running on a computer. It protects your computer from outside attempts to control or gain access. 

  • Hardware Firewall: 
  • It is a physical piece of equipment designed to perform firewall duties. 
  • A hardware firewall may actually be another computer or dedicated piece of equipment which serves as a firewall.


           πŸ””MORE MATERIALS TO BE UPLOADED STAY TUNEDπŸ””



CLASS 11 CS CHAPTER 19

 

CLASS -11  COMPUTER  SCIENCE

        CHAPTER- 19  TABLE JOINS AND INDEXES IN SQL

πŸ””To download textbook pdf click on the ''DOWNLOAD'' button below -


NOTES FOR COMPLETE UNDERSTANDING -

  • JOINS :
  • Join is a query which combine rows of two or more tables. 
  • In a join-query, we need to provide a list of tables in FROM Clause. 
  • The process of combining multiple tables in order to retrieve data is called joining. 
  • Unrestricted join or cartesian product of both the tables gives all possible concatenations of all the rows of both the tables.
  • How to JOIN  ?
  • Using table aliases :
  • A table alias is a temporary label given along with table name in FROM clause .
  • Consider two relations as below :                                                                                            ( !! THESE TWO WILL  BE USED LATER ALSO !! )







  • Using another search conditions  :
  • Example - 


  • Types of JOINS for joining more than two tables :
  1. Equi-Join :                                                                                                                                                           The join , in which columns are compared for equality is called Equi- Join .
  2. Non-Equi Join :                                                                                                                                                   It is a query that specifies some relationship other than the equality between the columns .
  3. Natural Join :                                                                                                                                                      The join in which only one of the identical columns exists is called Natural Join .                                   

  • Types of JOIN Clause of SQL Select :
  • Cross Join :                                                                                                                                                               The cross join is a very basic type of join that simply matches each row from one table to every row of the other table .
  • Natural Join :                                                                                                                                                              same as above
  • Left Join :                                                                                                                                                                     When we use Left Join all rows from the first table will be returned whether they match or not to the second table . For unmatched rows of the first table NULL is shown in the columns of second table .
  • Right Join :                                                                                                                                                                 This also works in the same manner as done by Left Join but with the table order reversed .

  • Indexes in Database :
  • Index is a data structure maintained by a database that helps to find records within a table more quickly. 
  • An index stores the sorted/ordered values within the index field and their location in the actual table.
  • An index in a database is also a table which stores arranged values of one or more columns in a specific order.

  • Creation of Indexes in MySQL :
  • We can create indexes in MySQL by two methods -
  • At the time of table creation. 
  • Creation of index at some already existing table.

  • Advantages & Disadvantages of Indexes :
  • Advantages : 
  1. With Indexes, queries gives much better performance. 
  2. Data retrieval is much faster with Indexes. 
  3. Indexes are very useful for Sorting purpose. 
  4. Unique indexes guarantee uniquely identifiable records in the database.
  •  Disadvantages : 
  1. With Indexes, the performance of insert, update and delete decreases. As every time insert/update/delete operation happens, the index is to be updated accordingly. 
  2. Index consumes storage space and this increases with the number of fields used and the length of the table. 
  

              πŸ””MORE MATERIALS TO BE UPLOADED STAY TUNEDπŸ””


WHY Software Developer ?