Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Sunday, 4 July 2021

Class 12 Informatics Practices - Scatter Plots Using Matplotlib (#class12InformaticsPractices)(#python)(#matplotlib)(#eduvictors)(#cbse2021)

Class 12 Informatics Practices - Scatter Plots Using Matplotlib 


Class 12 Informatics Practices - Scatter Plots Using Matplotlib  (#class12InformaticsPractices)(#python)(#matplotlib)(#eduvictors)(#cbse2021)


A scatter plot also called scatter chart uses dots to represent data points for two different numeric variables. The position of each dot on the horizontal and vertical axis represent an individual data point.  

A scatter plot is commonly used to compare distribution of two variables and to find visually any correlation between them. If there are distinct clusters/segments within the data, it will be clear in the scatter plot.


Let us try to plot a few scatter graphs using matplotlib.

Thursday, 30 July 2020

Python Snippets For Class 11 and Class 12 (Set-1) (#eduvictors)(#python)(#informaticspractices)(#cbse2020)

Python Snippets For Class 11 and Class 12

List of Python programs for students studying Informatics Practices and Computer Science.
 
 
Python Snippets For Class 11 and Class 12 (Set-1) (#eduvictors)(#python)(#informaticspractices)(#cbse2020)


Program 1: Write a program in python to accept a string and display it in reverse order.


# write a program in python to accept a string and display it in a reverse order.
str1=input("Enter a string: ")
print("Reverse string is: ",str1[::-1])

Output:


Python Snippets For Class 11 and Class 12 (Set-1) (#eduvictors)(#python)(#informaticspractices)(#cbse2020)


Thursday, 6 February 2020

CBSE Class 11 - Informatics Practices - Python Basics - Numpy Arrays (Part-1) - Question and Answers (#CBSEclass11Python)(#cbse)(#eduvictors)

Python Basics - Numpy Arrays 

(Part-1) - Question and Answers
CBSE Class 11 - Informatics Practices

CBSE Class 11 - Informatics Practices - Python Basics - Numpy Arrays (Part-1) - Question and Answers (#CBSEclass11Python)(#cbse)(#eduvictors)

Q1: What is NumPy?

Answer
1. NumPy stands for Numerical Python.

2. It is the core library for scientific computing in Python.

3. A NumPy array (also called ndarray) is a homogeneous multidimensional array of data objects.

4. A NumPy array is a table of elements (usually numbers), all of the same type, indexed by a tuple of positive integers.

5. Numpy module provides a set of methods and tools for working with these arrays.

6. In Numpy dimensions are called axes. The number of axes is rank.


Q2: What is the command line option to install NumPy module?

Answer: Run the following command at the command prompt. 
pip install numpy


Q3: What is one dimensional (1D) array?

Answer: A one-dimensional array or 1D array is a named group of a contiguous set of elements having the same data type. 1D arrays are also called vectors.

1D Array - CBSE Class 11 - Informatics Practices - Python Basics - Numpy Arrays (Part-1) - Question and Answers (#CBSEclass11Python)(#cbse)(#eduvictors)

Q4: What is a multi-dimensional array?

Answer: A multidimensional array is an array of arrays. Multi-dimensional arrays are also known as matrices. For example, a two-dimensional array (2D array) has two axes i.e. rows and columns.

Saturday, 27 July 2019

CBSE Class 11 - Informatics Practices - Python Snippets -1 (Arithmetic Operators) (#cbsenotes)(#eduvictors)

Python Snippets - 1(Arithmetic Operators)

CBSE Class 11 - Informatics Practices - Python Snippets -1 (Arithmetic Operators) (#cbsenotes)(#eduvictors)

Arithmetic operators are used with numeric values to perform mathematical operations. Python supports the following arithmetic operators

+   Addition: To add two numbers i.e. a + b
-   Subtraction: To find difference of two numbers i.e. a - b
*   Multiplication: Product of two numbers e.g. 2 × 3 = 6
/   Division: To find quotient in division i.e. returning the floating-point result of the computation
%   Modulus: To remainder in division method
//  Floor Division or Intger Division i.e. rounds the result down to the nearest whole number
**  Exponentiation e.g. find 12² = 144

The above said are also called binary arithmetic operator because it requires two operands.