CBSE Sample Questions for Final Exam-2020

CBSE Sample Questions for Class Xth and XIIth

CBSE has given sample questions for class Xth and class XIIth final exam -2020 much before time expected in last week of September 2019. This year CBSE has changed question pattern for all the subjects. So this is very important to students and teachers to go through the sample paper given. Most of the common change across the subject what I found is that 20-30% questions are going to be objective type (one marks each) across all subject.

This will definitely going to make question paper yet conceptual. Because to solve these objective type you need to read whole book or syllabus properly. Now here is the link to get the question papers from CBSE Website.

Click here for Sample papers for class XII all subject

Click here for Sample papers for class X all subject

Hope you will get benefited with this information. Best of luck for your preparation for examination.

Object Oriented Code in Python

Object Oriented Code in Python

This is time to go through the code to demonstrate the concept of OOP in Python. This is well known fact that OOP can not be done without Class and Object. So here is the example of Class and Object in Python.

Code of OOP in Python

Output of above code is –

Output of two Students Object

Now lets start understanding the code line by line. First line to Fourth line nothing but class level comment. Make it as clear and understandable as you can. Line no 8 is the beaning of class structure [class student(object): ]. It says that we are going start a class named Student and (object) is saying that this is new style of writing class and at last : is for starting the block statement. This is similar to { } sign in Java or C++

Next is [def __init__(self, name, marks):]. Here init is a function to initialise the object of class. If you are adding it well and good, if you left it don’t worry Python will insert it with default argument self on behalf of you. But here I used two extra parameters (name and marks), that means when ever user will try to create the object of Student class he/she have to pass these two parameters. After that self.name and self.marks are two instance variables which are getting initialised by parameters of init method. Remember the style of writing init method, it starts with two underscore sing and ends with the same two underscore sign.

Now you can write N numbers of methods a per your business requirement. Remember that if the function takes self as parameter are instance method and will get called by the object directly. [def getStudent(self):] this is the only function we are heving right now.

Lastly we need to create object and call method associated with that. [s1 = student(‘Robin’, 98)] will create one object s1 of student class. As my init method takes two parameters except self. So need to pass. and lastly call getStudent() on s1. You will get output as above. I created two Objects, you can create as much as you want.

That’s it. You are done with basic example of Class and Object in Python. Comments and feedback are always welcome. Bye bye…

Check Right Angle Triangle using sides.

As you aware that this is very common question asked in exams in school. Basic logic to get this is to check if any of the sides square value is equal to the addition value of squares of other two side. For example if a, b, c are three sides then if a**2 = b**2+c**2 then this triangle will be the right angle triangle. This logic is valid for any of the side from a, b, c. Lets have a look into the program.

Program to Check Right Angle Triangle

Output –

First Side – 6
Second Side – 5
Third Side – 4
NOT A RIGHT ANGLE TRIANGLE

First Side – 3
Second Side – 4
Third Side – 5
Given data is making a RIGHT ANGLE TRIANGLE

Finding largest in list elements in Python.

Largest in List of Python

This program is to find the largest among the list elements using for loop. Logic here is to store first element in variable called large and iterate the rest of the elements using for loop from 1 to length of list. Now check if the element found is greater then the variable large then assign the current element value in large and continue the same.

Program to find largest among the list elements.

Output of this will look like this. –

List elements are – [4, 5, 3, 2, 5, 7, 9, 1]
Largest element in list is – 9

Sample Papers


CBSE sample papers for class Xth and XIIth Exam

This is time to start putting focus on exam question paper patterns. As CBSE has announced the date of examination of its final exam which is going to get started from 15th of February 2019 and will get finished in last month of March 2019.

Here is the link to download sample question paper from the CBSE website. You can download it for class XII from – http://cbseacademic.nic.in/SQP_CLASSXII_2018_19.html

And for class Xth from the link – http://cbseacademic.nic.in/SQP_CLASSX_2018_19.html