An educational infographic introducing Basic Python Programming featuring: Python Syntax: Print statements (print("Hello World")), variables (x = 5), and indentation examples Data Types: Strings, integers, lists, and dictionaries with color-coded examples Control Structures: if-else conditions, for/while loops with flowcharts Simple Programs: Calculator code, number guessing game, and temperature converter.

Basic python -1 (QNA)

Q1: What are tokens in Python? How many types of tokens are allowed in Python?
A1: In Python, tokens are the basic components of the source code. They are the smallest unit of code that Python interpreter can understand. Tokens can be classified into the following types: Keywords, Identifiers, Literals, Operators, Punctuators.
Q2: How are keywords different from identifiers?
A2: Keywords and identifiers are both tokens in Python, but they serve different purposes. Keywords are reserved words in Python that have special meaning and cannot be used as variable names, function names or any other identifiers. Identifiers are user-defined names to represent variables, functions, classes, modules, etc.
Q3: What are literals in Python? How many types of literals are allowed in Python?
A3: Literals in Python are immutable (unchangeable) data types. They are the constant values of the variables that we declare in our programs. There are several types of literals: String literals, Numeric literals, Boolean literals, Special literals, Literal collections.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top