Q.1. State the difference between Interactive and Script Mode.
Interactive Mode is a command line shell which gives immediate result for each instruction, while running previously fed instructions in active memory. As new lines are fed into the interpreter, the fed program is evaluated both in part and in whole.
The Script Mode on the other hand allows you to type in instructions into a file, which is then used by the interpreter for execution of the instruction. Thus instead of having to run one line or block of code as in interactive mode you can type up all your code in one text file, or script, and run all the code at once.
Q.2. What is a Data Type? What are the data types used in Python?
Data Type is a way of dictating Python what type of data will a variable hold.
Q.3. State the process of starting Python IDLE.
To start the Python IDLE.
- Click on Start → All apps of the Start Menu.
- Scroll down the list until you get Python 3.6. Click on it.
- It shows you a list of programs in a submenu. Click on IDLE (Python 3.6 32-bit)
Q.4. Give any two aspect of the print( ) statement in Python.
The two aspects of print() statement are:
- The print( ) statement is used to display an output.
- In case you want to display a message, you need to enclose within quotes within the parenthesis. Any text enclosed within quotes is called a string. A string may consist of letters, digits and/or symbols. Thus print( ) statement is used to display a string.
Q.5. Name the different numerical data types used in Python.
Python has five standard data types:
- Numbers
- String
- List
- Tuple
- Dictionary
62 videos|66 docs|14 tests
|
|
Explore Courses for Class 9 exam
|