In this post, we will discuss Important QnA Python Fundamentals for class 11 Computer Science/Informatics Practices or Introduction to python chapter. Questions based on the python fundamentals, installation of python, the structure of the python program.
Important QnA Python Fundamentals for class 11
So here we start the article with basic questions for Python Fundamentals for class 11.
Q – 1 What is python?
Ans. : Python is a popular middle-level programming language but not a high-level programming language like C, C++, Java.
Q – 2 Why python is a popular programming language?
Ans.: There few reasons why python is a popular programming language, few reasons are as following:
- Its easy structure
- The liveliness of code and productivity
- No brackets in code
- Fewer lines in code
- Interpreted Language
Q – 3 Who developed python?
Ans.: Python was developed by Guido Van Rossum in February 1991 and then Python Software Foundation.
Q – 4 Enlist various distribution of python programming language.
Ans. The few distributions of Python programming are as following:
Q – 5 Which one is the latest version of Python?
Ans. The latest version of python is Python 3.8.3
Q – 6 How to get python and install?
Ans. Python can be downloaded from www.python.org. Find the OS relevant version for the computer and install.
The next section of Python Fundamentals for class 11 provides you the questions related to IDLE.
Q – 7 What is Python IDLE?
Ans.: Python IDLE is a tool which allows writing python programs and provides the output on screen after running the program. IDLE stands for Integrated Development and Learning Environment.
Q – 7 What are the two basic modes available for writing a program in Python IDLE?
- Interactive Mode: Write a few lines of code and display the output
- Script Mode: Write large programs and allows to save the program for future use
Q – 8 Write steps to how to work with interactive mode?
Q – 9 Write steps to work with script mode.
The next section of Python Fundamentals for class 11 talks about the basics of python programing.
Q – 10 What is token?
Ans.: The smallest units of a program are known as a token.
Q – 11 Which token are used in python?
Ans.: The tokens used in python are as following:
Q – 12 How to write multiple lines code in python? or What are the ways to write multiple lines code in python?
Ans.: Python allows two ways of writing code in multiple lines in a program:
By using double quotes and slash
>>> str = "This is an example of multiple line \ Code in \ Python"
By using triple double quotes
>>> str = """This is an example of multiple line of code in Python"""
In the next section of Python Fundamentals for class 11 is all about data types in python.
Q – 13 What is the use of None in Python?
Ans.: None is a special literal used in python. It means there is no value stored in an identifier. In other words, None means the that value is not assigned to the identifier.
Q – 14 Identify the types of the identifier of the following: 15.859, 125, True, ‘True’, False, ‘False’, 0XDADA, 0o456, None, “None”
Q – 15 Differentiate between an expression and a statement.
|It is a combination of letters, numbers and symbols||It is a programming instruction written according to python syntax|
|It represents some meanings in a program||It perform a specific task in a program|
|It is evaluated by python||It is executed by python|
|It produces value as a result||It does not produce any value|
|Example: (25 + 7) / 4||Example: If x<100:|
The next section of Python Fundamentals for class 11 talks about error finding questions.
Q – 15 Find out errors in the following
x = 090 y = 0o123 z = 0o99 print x print(y) print (x AND y AND z)
Line 1: The variable x should initialize a number starting with 0 because python doesn’t allow to do the same.
Line 3: When a value starts with 0o it represents the octal value and octal value is in the range of 0 to 8. In this line, z is initialized with 99 which is out of range.
Line 4: Brackets are missing in print() function. Click here to read more about print() function from datacamp.com.
Line 5: print() function required comma-separated value to print.
p,q,r= 33, 44, 66 print(p;q;r)
Ans.: Same as above Line 5 explanation.
n=input("Enter no.") sq_of_n=n*n print(sq_of_n)
Runtime error inline 1 as input() function returns only string that doesn’t allow computation. To allow computation int the statement use int(), the correct would be like this:
cname=int("Enter Name:") bill=int(input("Enter amoumnt:")) print(cname) print(bill)
In input() function is required in place of int. Line 3 and line 4 should be use with the same indent level as other lines.
More questions will be added in this article Python Fundamentals for class 11 so visit our blog regularly.
I hope you enjoyed the article Python Fundamentals for class 11. Share this article with your classmates and friends to help them.