: LET Us REVISE :
M3-R5.1 · Chapter 3: Introduction to Python · 4 min read
: LET Us REVISE :
- Python program can contain various components like expressions, statements, comments , functions, blocks and indentation
- An Expression is a legal combination of symbols that represents a value.
- Statement is a programming instruction
- Comments are non-executable, additional information added in program for readability
- In python , comments begin with a # character
- Comments can be single-line , multi-line comments and inline comments
- Function is a named code that can be reused with a program
- A block /suite/code-block is a group of statements that are part of another statement
- Blocks are represented through indentation
- A variable in python is defined only when some value is assigned to it
- Python supports dynamic typing i.e. a variable can hold values of different types at different times.
- The input() is used to obtain input from user; it always returns a string type of value
- Output is generated through print() ( by calling print function) statement.
- Constant is data item that never changes its value during a program run
- Identifier is a name given by user for a part of the program
- Keyword is a reserved word having special meaning and purpose
- Lexical Unit is other name of tokens
- A literal is a constant
- Token is the smallest individual unit is a program
- String literal is a sequence of characters enclosed in any type of quotes
- Variable is a named stored location whose value can be manipulated during program run
- Expression is legal combination of symbols that represents a value
- Square brackets can be used to access elements of the string
- Python has a special function called type that tells us the data type of any value
- Python does not need to be compiled before it is run
- Complex numbers are always represented as two floating point numbers the real and imaginary part
- Float can also be scientific umbers with an “e” to indicate the power of 10
- Strings can be displayed on screen using the print() function
- Every value in python has a data type
- Converting one data type in to another data type is called Typecasting
- In python input() is used to requests and get information from the user
- Literal can be defined as a data which is given in a variable or constant
- IDLE is a basic editor and interpreter environment
- >>> is the default python prompt of the interactive shell
- Object code is a program that the computer can directly execute
- A program stored in a file is called Script
- Comment are the entries in a computer program for the purpose of documentation or explanation