Saturday, 16 March 2019

states and transition class 11 python cbse.

STATES AND TRANSITION

STATE: A state is a state of computation with a specific set of information that is sufficient to determine the future possible behavior.

TRANSITION:A marked change from one state to another in response to some external input and or stimulus.

STATES AND TRANSITION DIAGRAM

It is used to represent roots from one state to another in these diagram.

The circles represent state.

Arrow represent transition.
EX.


Sorting class 11 python cbse

SORTING

It refers to arranging element in a specific order ascending or descending 

BUBBLE SORTING

The basic idea is to compare 2 adjoining values and exchange ,then if they are not in proper order.In every pass the heaviest element settles at its appropriate position in the bottom.

BUBBLE SORT

alist=[15,6,13,22,35,2]
print("original list is'' : alist)
        n=len(alist)
for i in range (n):
     for j in range (0,n-j,-1):
           if alist (i)>alist (j+1):
                     alist=(j+1):
print("list after sorting:,alist)

INSERTION SORT

lst=[15,14,2,3,4,5,6,77,88,90]
print("original list is:"lst)
for i in range (1,len(lst)):
          temp=lst[i]
          j=i-1
          while j>0 and temp<lst[j]:
                  lst[j+1]=lst[j]
                   j=j-1
             else:
                  lst[j+1]=temp
print("list after sort is:",lst)

Debugging class 11 python cbse

DEBUGGING

Finding error, reasons of their occurrence and technique of their fixation. 

Error and Exception

  • Errors and exceptions, both interrupts the program execution.
  • Errors and exception are not same.
  1. Error, usually finds out at the time of translation.
  2. whereas, exception generates during program run, due to an input.
  • An error is also known as bug,is a programming code that prevents a program from its successful interpretation.

Error are of three type:

  1. Compile time error 
  2. Run time error 
  3. Logical error
  • Compile time error 
These error are basically of two types.
  • Syntax error: Violation of formal rules of a programming language results in syntax error.
for ex:
   x=(x*y)
  • semantics error: semantics refer to the set of rules which sets the meaning of statements.Meaning less.
x*y=z

  • Logical error
If a program is not showing any compile time error or run time error but not producing deride output, it may be possible that program is having a logical error. This error generates because of wrong analysis by programmer.
For ex. To use a variable without an initial value.

  • Run time error
These errors generates during a program execution and known as run time error.
some run time error are difficult to find out.
some error prevent a program from execution which is known as program crash or abnormal fermentation of program.

EXCEPTION

  • Exception is a state when a program turminance abnormally unit cant't be controlled.
ex. a=10 
      b=0
(=a/b(Mathematics exception)
An uncertain cause termination of a program.

Exception handling in python

  • Try and except claim are used to handle an exception.
Try 
# Code with probability of exception will be written here.

Except
# Code to handle exception will be written here.

Hoe to debug a program?

An error can debugged by correcting the code.
There are following techniques of debugging.
  • To identify the place of error generation.
  • By tracing the program code.

Detection origin of an error

When you run a code interrupt will run a line of code if it is free from any syntax and semantics error. And will visit the error if the running line of code has some error.

Printing of step wise value of variable

Depending upon your algorithm the variable value change during the execution some times we get incorrect output but cannot figure out what is causing it, in that case it is good idea to add many inspect values of variables after each step.

Tracing of code 

Code tracing means executing code one line at a time and watching it's impact on variable, it is often done with butin debugging tools also known as debugger.

Break Point

Break point are temporary halt maker in source code that stop the debugger at the marked code line by line from top to bottom and half at the where the break point is setup.

tuples class 11 python cbse

TUPLES


  • Tuples is also kind as container which can store list of any kind of values.
  • Tuples is a immutable data type which means we can not change any value of tuple.
  • Tuple is sequence like string and list but the different is that list is mutable whereas string and tuple are immutable.

CREATION OF TUPLES

  • Empty tuple: >>>t = ( ) 
  • Single tuple: >>>t = (1)
  • Nested tuple: >>>t = (1,12,2,(2,3))
  • Long tuple: >>>t = (1,2,3,4,5,6,7)

Tuple functions 

  • len( ) function
  • max( ) function
  • min ( ) function
  • index ( ) function
  • tuple( ) function

Unpacking Tuple

Forming a tuple from individual value is called packing and creating individual values from a tuple element is unpacking.

FOR EXAMPLE:

t = (1,2,'A','B')
length= 4
w,x,y,z= t
print(w)

         1


List creation class 11 cbse

LIST CREATION

  • List is sequence which can store value of and kind.

CREATION OF LIST

  • >>>Mylist = list('hello')
          >>>Mylist 
                 ['h','e','l','l,'o']
  • >>>L1= list(input("enter list element"))
          Enter list Element 1,2,3,4,5
          >>> L1
          (1,2,3,4,5)
eval( ) function identifier type of passed string and then return it.

>>>a="15"
>>>b="25"
>>>print(a+b)
       1525
>>>print(eval(a)+eval(b))
       40

Accessing of list

  • len( ) function is used to get the length of list.
  • L[i] will return the value exist at index.
  • L[i:j] will return a new list with the values from i index to j list excluding j index.

Transverse of list

Transverse of a list means to access and process each and every element of that list.

List slicing

  • To slice a list index is-
>>>lst = [10,12,14,20,22,24,30,32,34]
>>> SEQ= lst[3:-3]
>>>SEQ
      [20,22,24]

SEQ=list[start:stop]
seq=list[start:stop:step]

string manipulation class 11 cbse

STRING MANIPULATION

STRING CREATION
  • By assigning value direct to the variable
>>> str ="I love myself"
>>> str
I love myself
  • By taking input
>>> str= input("enter a number")
     Enter a string This is python
>>> str 
     This is python

Transverse of a string

string1= input("Enter a string:")
print("The",string1,"in reverse order is:")
length= len(string1)
for a in range (-1,(-length),-1))
      print(sting1[a])

Membership operator in a string.

  • in operator result into True or False.
like= "a" is in "pradeep"will result into true.
  • not in
"k" not in "kumar" will result false.

String comparison operators

upper case and lower case has different unicode value.
EX. "A"=="a" false
       "abc"=="ABC" false
       "b"=="b" true

How to get unicode/ Ordinal value

>>>ord('a')
   97
>>>ord('A')
   65
>>> char(97)
   A

fundamental of python class 11 cbse part 3

PART 3

FLOWCHART

Flowchart is a graphical representation of an algorithm, workflow or process. The flowchart shows the steps as boxes of various kinds, and their order by connecting the boxes with arrow.

Conditional (if) statement.

In python, if statement is used to select statement is to be done on the basis of a condition, if statement.
if <condition>:
                statement.

if-else statement.

if<condition>:
                   statement when condition is true.
else:
      statement when condition is false.

if-elif statement.

a=int(input("Enter a number"))

if a==10:

           print("a is equal to 10")

elif a==20:

           print("a is equal to 20" )

else:

           print("a is not equal to 10 and 20")

NESTED if-else.

a=int(input("enter a no.")) 
b=int(input("enter a no."))
c=int(input("enter a no."))
if a>b:
        if a>c:
                  print("a is greater")
    else:
           print("c is greater")

in and not operator.

  • in operator 
           3 in [1,2,3,4] will return true.
           5 in [1,2,3,4] will return false.
  • not operator
           5 not in [1,2,3,4] will return true.

While loop

n=int(input("enter a no."))
c=1
while c<11:
           print(n,"x",c,"=",c*n)

JUMP STATEMENT(break)

n=int(input("enter a number"))
  c=1 
while c<11:
         is c==5:
              break
           print

CONTINUE STATEMENT

n=int("input a no."))
c=0
while c<11:
c=c+1
if c==5:
       continue
print (n,"x",c,"=",c*n)
           


Friday, 15 March 2019

fundamental of python class 11 cbse part 2

PART 2

DATA TYPES

  • Data can be of any type like character, integers, real, string,
  • Anything enclosed in " " is considered as string in python.
  • Any value of fraction part is a real value.
  • True or False value specific boolean value.

MUTABLE AND IMMUTABLE

  • In python, Data object are categorized in 2 types-
  1. Mutable (changeable) - list, dictionary, sets.
  2. Immutable (not changeable) - integers, float, boolean, string and tuple.

STRINGS

A string can hold any type of known characters that is no. , letter and special characters.
  • Python string stores unicode character.
string is the sequence of character and each character can individually accedes using its index.

forward index starts with 0

backward index starts with -1

In word python 

  • name (0)='p'=name(-6)

LIST

  • It represent a, separated values of any data type between square brackets [ ]. [1,3,4,].
  • List can be changed or modified. That is why list is mutable.
>>> a=[1,2,3,4]
>>> a
     [1,2,3,4]
>>> Print (a)
     [1,2,3,4]
To change 1st value.
>>>a(0)=10
>>>a
      [10,2,3,4] 

TUPLES

  • Tuples are also list. It separates values of and type within parentheses.
EXAMPLES
  1. p=(1,2,3,4,5,6)
  2. f=(1,3,5,7) 
  • Values are immutable.

DICTIONARY

  • It is an un ordered set. It separates key:value pairs within { }, with the requirement that within a dictionary no 2 key can be the same.
>>> vowels={'a':1,'b':2}

computer system and organisation class 11 cbse

COMPUTER SYSTEM AND ORGANIZATION

Computer is an electronic device which can varieties of performance.

DATA

Data in computer terminology mean facts and figures.
             Eg: a boy open a the book of science.

Data is use o process he information when data is process it completes the information.
             Eg: A boy open the science book.

INPUT UNIT

It is responsible for taking input and convert it into binary.

C.P.U

Central processing unit. 

A.L.U

  • Arithmatic logic unit.
  • It performs the arithmatic (+,-,*) or logical (<,>,=<,=>) operation.
  • eg. when 2 no. are required to be added these no. are sent from memory to ALU.

 

C.U

Control unit

  • It may can control and guide the interpretation flow manipulation of data and information.
  • Cu is program executor.
  • Cu send signal to memory to send the information in the sequence of CU.

MEMORY

The memory is temporary and cannot be remember anything after it is switch off.

TYPES

 PRIMARY

 Temporary based memory
                  ex. RAM and ROM.

SECONDARY

Space is needed to store the data and information.
                  ex. BIT, GB, TB etc.

STORAGE UNIT

             HARD DISK

It stores information in one or more circular disk which are continues spinning. 

             CD

CD are relatively cheap and have a storage capacity of 780mb.

             DVD

It look like CD, it hold 15x as much as CD. And transfer 20x than CD.

             PENDRIVE

It is flash moving part like a storage device. It work like RAM.

              
                     



fundamental of python class 11 cbse part 1

PYTHON FUNDAMENTALS

CHARACTER SET

  • It is a group of letters and signs which are specific to a language.
  • Set include letter, sign, number, symbols.
  1. Letter:A-Z, a-z.
  2. Digit: 0-9.
  3. special symbols: -,=,*,/,',(,) etc.
  4. White spaces: blank space, tab, carriage, return, newline, formfeed etc.
  5. Other character: Python can process all character of ASCII and UNICODE.

TOKENS

  • Tokens is the smallest unit of any programming language.It is also known as Lexical unit.

Types of token are-

  1. keyword
  2. Identifiers
  3. Literals
  4. Operators 
  5. Punctuators

KEYWORDS


  • Keywords are those words which provides a specific meaning to interpreter.
  • These are reserved for specific functioning.
  • These can not be used as identifiers ,variable name or any purpose. 
               eg. false, class, if, or.

IDENTIFIERS

  • Theses are building blocks of a program and are used to give names to different parts/blocks of a program like variable, objects, classes, functions.
  • An identifier may be combination of letter and numbers.
  • An identifier must begin with an alphabet or an underscore ( _ ). Subsequent letters may be number (0-9).
  • Uppercase and lowercase has different meaning.
  • Length of an identifier is unlimited.
  • Keywords can not used as an identifier.
  • Ex. Myfile, Date_9_0_12.

LITERAL / VALUES 

  • Literal are also called constant values.
  • Python permits following types of literals.

  1.  String literals.
  2. Numeric literals.
  3. Boolean literals.
  4. Special literals.
  5. Literal collection.

String literals

  • String literals is sequence of characters that can be a combination of letters, numbers and special symbols, enclosed in quotation mark, single, double, triple. (' '," ","' "').
  • Types of string
  1. Single line string: Text ="hello world" or Text = 'hello world'.
  2. Multi line string: Text= 'hello/ or Text=
                                                 world'

Numeric literals

numeric values can be of 3 types-  

INT.  

  • Decimal int. literal - 10,17,210 etc.
  • Octal int. literal - 0o17, 0o217 etc.
  • Hexa decimal int.- 0x14 etc.           
FLOAT (floating point real value)

  • Fraction form - 2.5 , 4534.456+3455.434, etc.
  • Exponent form - 1.8E+5. etc.

COMPLEX ( complex numbers)

  • 3+5i etc.

BOOLEAN LITERAL

  • It can contain either of only 2 values- true or false.

SPECIAL LITERALS

  • None, which means nothing(no value)
             x= none

OPERATORS

  • An operator is symbol that trigger some action when applies to identifiers (s)/ operand(s).
  • Therefore, an operator requires operand (S) to computer upon.
             Eg: C=a+b
    Types of operators
  1. Uniary Operators.
  2. Binary Operators.

PUNCTUATORS

  • In Python, punctuator are used to construct the program and make balance between instruction and statements Punctuators have their own synthetic semantic significance.  
  • EX. /.;'=- etc.

Wednesday, 13 March 2019

how to buy a free domain or hosting

HOW TO BUY A FREE DOMAIN OR HOSTING ?

Buying a free domain is not possible until you are adding the company name with your domain. No one can provide a free domain of your own choice. As nothing in world is free. so don't believe in to someone who is promising you to give a free domain name. Many are encountered by these fake promising people or sides. How can someone provide you something free of cost or without any need? So don't be the victim of these kind of fakes.
                          Because know a days nothing is available without money. Money is required for everything. If you are here finding a domain probably you are thinking about making a website or something related to business. Can you work for free and live without money and needs?
NO! I can't.  
what about you let us know in the comment box?
So how can you expect someone to?

BUT!

we can provide you your domain name with some cash backs of $10 to $15 if you buy a domain from our agency .We are no promising you to provide you a free domain or hosting.

What can you do with the $10 or $15?

$10 can help you a lot in developing your website or blog in many way. Or you can save it somewhere for future purposes. It sound funny but yes $10 is quite useful for some and can be very useful for many.

HOW CAN BUY YOUR DOMAIN FROM US?  

STEPS

  1. Read all steps.
  2. Then read how we work (present after all the steps) for your assurance.
  3. click on the link below
  4. https://www.bluehost.com/track/vinitsanantakumar/
  5. <a href="https://www.bluehost.com/track/vinitsanantakumar/" target="_blank"> <img border="0" src="https://bluehost-cdn.com/media/partner/images/vinitsanantakumar/760x80/760x80BW.png"> </a>
  6. After buying your domain give us a prove whit your paypal account address on vinitskumar2960@gmail.com  please make sure that you are giving a true prove as we have all the records with us.
  7. The money will be transferred in your account within 8 hours.
  8. Work hard and make your self a brand. 

HOW WE WORK?

We are sales partner of the company. They pay us as a some amount after every sale.With that amount we pay the cash backs of minimum $10. In this process no one in lose company to  get there product sold and we get our amount and buyer get there cash. Everyone is in profit. 

BE HAPPY DO WHATEVER YOU WANT