Podcast
Questions and Answers
An ordered set of instruction to be executed by a computer by a computer to carry out a specific task is called ______.
An ordered set of instruction to be executed by a computer by a computer to carry out a specific task is called ______.
Program
Computer understand the language of 0s and 1s which is called
Computer understand the language of 0s and 1s which is called
A program written in a high-level language is called ______code.
A program written in a high-level language is called ______code.
Binary language
Language translator convert ______ code to ______ code.
Language translator convert ______ code to ______ code.
Signup and view all the answers
Which of the following is not correct about python?
Which of the following is not correct about python?
Signup and view all the answers
Python is case sensitive.
Python is case sensitive.
Signup and view all the answers
Which keyboard key is used to run python programs?
Which keyboard key is used to run python programs?
Signup and view all the answers
All keywords in Python are in lower case.
All keywords in Python are in lower case.
Signup and view all the answers
Which of the following is not the feature of python language?
Which of the following is not the feature of python language?
Signup and view all the answers
In which of the following mode, the interpreter executes the statement and displays the result as soon as we press 'Enter' key?
In which of the following mode, the interpreter executes the statement and displays the result as soon as we press 'Enter' key?
Signup and view all the answers
By default, the Python scripts are saved with ______ extension.
By default, the Python scripts are saved with ______ extension.
Signup and view all the answers
By default, the Python scripts are saved in ______.
By default, the Python scripts are saved in ______.
Signup and view all the answers
______ are reserved words.
______ are reserved words.
Signup and view all the answers
Which of the following is not correct for naming an identifier in Python?
Which of the following is not correct for naming an identifier in Python?
Signup and view all the answers
Comments in python program are ______ by interpreter.
Comments in python program are ______ by interpreter.
Signup and view all the answers
In Python single line comment starts with ______.
In Python single line comment starts with ______.
Signup and view all the answers
In Python multi line comment starts with ______.
In Python multi line comment starts with ______.
Signup and view all the answers
Which of the following is a sequence data type?
Which of the following is a sequence data type?
Signup and view all the answers
______ is a set of valid characters that a language can recognize.
______ is a set of valid characters that a language can recognize.
Signup and view all the answers
The smallest individual unit in a program is known as ______
The smallest individual unit in a program is known as ______
Signup and view all the answers
Which of the following is invalid identifier?
Which of the following is invalid identifier?
Signup and view all the answers
Which of the following statement is wrong?
Which of the following statement is wrong?
Signup and view all the answers
Identifier can start with number.
Identifier can start with number.
Signup and view all the answers
Variables of data types like integers, float etc., hold ______
Variables of data types like integers, float etc., hold ______
Signup and view all the answers
An ______ is a symbol which is used to perform specific mathematical or logical operation on values.
An ______ is a symbol which is used to perform specific mathematical or logical operation on values.
Signup and view all the answers
Operators work on values called ______.
Operators work on values called ______.
Signup and view all the answers
Operators working on Operand ______ data value.
Operators working on Operand ______ data value.
Signup and view all the answers
Which of the following is number data type in python?
Which of the following is number data type in python?
Signup and view all the answers
Binary operators are operators with ______ operands.
Binary operators are operators with ______ operands.
Signup and view all the answers
In Python, we have ______ function for taking input from the user.
In Python, we have ______ function for taking input from the user.
Signup and view all the answers
The user may enter a number or a string but the input() function treats them as ______.
The user may enter a number or a string but the input() function treats them as ______.
Signup and view all the answers
Study Notes
Python Basics
- Python is an ordered set of instructions executed by a computer to perform a task.
- Python uses a high-level language, which is converted to machine code.
- Python uses an interpreter to convert code.
- Python is an open-source language developed by Guido van Rossum.
- Python is case-sensitive.
- Python's keywords are written in lowercase.
- Python programs are run using the
Ctrl + R
key combination.
Data Types and Variables
- Variables can store different types of data.
- Integers, floats, and strings are examples of data types.
- Variables can hold a single value.
- Variables start with a letter or underscore.
Operators
- Operators perform actions on data values.
- Operators can be mathematical, logical, or comparison.
Comments
- Comments are notes in the code that do not affect the program's execution.
- Single-line comments start with
#
. - Multi-line comments use triple quotes (
"""..."""
).
Identifiers
- Identifiers are used to name variables, functions, classes.
- Identifiers cannot start with numbers.
- Reserved words (keywords) cannot be identifiers.
Data Types
- Integer, float, string, boolean, and complex are data types.
Input/Output functions
- input()
- The
input()
function receives input from the user. - The user input can be treated either as a string or a number depending on the program.
Python Statements
- Python uses brackets (
()
), braces ({}
), and parentheses ([]
). - Python executes statements sequentially.
Interactive mode
-
Interactive mode
is when Python executes statements as soon as they're entered.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your understanding of Python basics, including data types, operators, and the use of comments. This quiz covers fundamental concepts essential for programming in Python. Perfect for beginners looking to solidify their knowledge.