Kips Class 8 Cyber Beans Chapter 7 Review Python


Chapter 7 Review Python

Brain Developers
A. Fill in the blanks:
1. The data type of a variable is an attribute that tells what kind of data can a variable have.
2. There are two types of string operators.
3. The statements that govern the flow of a program are called control statement.
4. Comments are the statements that are written while programming but are not executed during program execution.
5. F5 is the shortcut key to execute a program.

B. State True or False:
1. Logical operators are used to assign a value to the variable. (False)
Correct Answer:
Assignment operators are used to assign a value to the variable.
2. The value of the variable cannot be changed during program execution. (False)
Correct Answer:
The value of the variable may or may not be changed during program execution.
3. In Python, ‘and’ is an example of Logical operators. (True)
4. Script Mode is used to create files in Python. (True)
5. Python is a case-sensitive language. (True)

C. Multiple Choice Questions:
1. Python can work in _____________ different modes.
a) Three
b) Four
c) Two
d) Five
Answer:
c) Two

2. Concatenation is a ___________ operator.
a) String
b) Integer
c) Float
d) Boolean
Answer:
a) String

3. A single line comment can be created by using the _________ symbol.
a) $
b) #
c) &
d) @
Answer:
b) #

4. The ___________ construct executes the statements in a sequential manner.
a) Iterative
b) Conditional
c) Selection
d) Sequential
Answer:
d) Sequential

5. The files in Python are saved with the extension ________.
a) .pyth
b) .py
c) .pthy
d) .python
Answer:
b) .py

D. Answer the following:
1. Write any two features of Python that make it user-friendly.
Answer:
Two features of Python that make it user-friendly are
• Simple and interactive
• Platform independent

2. What is the difference between the Interactive mode and the Script mode of Python.
Answer:
In the Interactive mode, Python displays the results of expression. In the Script mode, Python does not automatically display results. Interactive mode is used to write small programs because the output in the Interactive mode is compressed between the statements and is not suitable for writing lengthy programs. So, to write lengthy programs we use the Script mode in which we can create and edit the programs. The files created in the Script mode can be saved for later use.

3. What is the purpose of adding a comment in the program? What are the two ways used to add the comments in Python?
Answer:
Comments are the statements that are added to a program with the purpose of making the code easier to understand. There are two types of comments in Python:
• Single Line comments
• Multiline comments

4. How is ‘if’ statement different from ‘if…else’ statement?
Answer:

‘if’ statement: This statement is used to evaluate only one condition. It performs a course of action if the condition evaluates to true, otherwise it skips the statements.
‘if…else’ statement: This statement is used when either of two different actions are to be performed depending the result of the conditional expression. It works on two blocks: if and else. In case the conditional expression evaluates to true, the statements in the ‘if’ block are executed, and if the statement is false, then the statements in the ‘else’ block are executed.

5. Differentiate between the function of ‘+’ operator when used with integer and string values.
Answer:
If ‘+’ operator is used with integer values, it is used to find the sum of the data values. But if ‘+’ operator is used with string values, it is used to join two string values.

6. What is the difference between the following statement?
a=10 and a==10
Answer:
In the statement a=10, the variable ‘a’ is assigned value 10. However, in the statement a==10, the value of ‘a’ is equated with 10. The ‘=’ (equal to) sign is the assignment operator in Python, whereas, ‘==’ sign is called the equal to operator.

No comments:

Post a Comment

Also read!

Click on any of the below text for additional links:

Class 6

Class 6 Computer Kips Solutions
Class 6 Gul Mohar English Solutions
→ Class 6 Map Pointing Solutions
Class 6 NCERT Civics Solutions
Class 6 NCERT Geography Solutions
Class 6 NCERT History Solutions
Class 6 NCERT Maths Solutions
Class 6 NCERT Science Solutions

Class 7

Class 7 Computer Kips Solutions
Class 7 Gul Mohar English Solutions
English Grammar Class 7
English Writing Skills Class 7
Class 7 Map Pointing Solutions
Class 7 NCERT Civics Solutions
Class 7 NCERT Civics Notes
Class 7 NCERT Civics Extra Questions
Class 7 NCERT Geography Solutions
Class 7 NCERT Geography Notes
Class 7 NCERT Geography Extra Questions
Class 7 NCERT History Solutions
Class 7 NCERT History Notes
Class 7 NCERT History Extra Questions
Class 7 NCERT Maths Solutions
Class 7 NCERT Science Solutions
Class 7 NCERT Science Notes
Class 7 NCERT Science Extra Questions

Class 8

Class 8 Kips Artificial Intelligence Solutions
Class 8 Gul Mohar English Solutions
English Grammar Class 8
English Writing Skills Class 8
Class 8 Map Pointing Solutions
Class 8 NCERT Civics Solutions
Class 8 NCERT Civics Notes
Class 8 NCERT Civics Extra Questions
Class 8 NCERT Geography Solutions
Class 8 NCERT Geography Notes
Class 8 NCERT Geography Extra Questions
Class 8 NCERT History Solutions
Class 8 NCERT History Notes
Class 8 NCERT History Extra Questions
Class 8 NCERT Maths Solutions
Class 8 NCERT Science Solutions
Class 8 NCERT Science Notes
Class 8 NCERT Science Extra Questions
Class 8 NCERT Science Exemplar
Class 8 NCERT Science MCQs

Class 9

Class 9 Kips Artificial Intelligence Solutions
Class 9 Map Pointing Solutions
Class 9 NCERT Civics Solutions
Class 9 NCERT Geography Solutions
Class 9 NCERT History Solutions
Class 9 NCERT Maths Solutions
Class 9 NCERT Science Solutions

Class 10

Class 10 Kips Artificial Intelligence Solutions
Class 10 NCERT English Solutions
→ Class 10 Map Pointing Solutions
Class 10 NCERT Civics Solutions
Class 10 NCERT Civics Notes
Class 10 NCERT Civics Extra Questions
Class 10 NCERT Geography Solutions
Class 10 NCERT Geography Notes
Class 10 NCERT Geography Extra Questions
Class 10 NCERT History Solutions
→ Class 10 NCERT History Notes
Class 10 NCERT History Extra Questions
Class 10 NCERT Maths Solutions
Class 10 NCERT Science Solutions
Class 10 NCERT Science Notes
Class 10 NCERT Science Extra Questions

Computer Languages

Python Basics

Extra Activities

Extra Activities

Extra Knowledge

Extra Information
General Knowledge
Historical Places in India
Latest technology
Physical Sciences
Facts

• Mathematics quick links
Mathematical Terms
Maths Tricks

Home Top