Python CA1 12313955
Python CA1 12313955
ANALYTICS-I
[
C
A
-
1
]
Answer –
Explanation:
This is a valid identifier. It follows the rules for naming variables in Python. It starts
with a letter (or underscore) and is followed by letters, underscores, or digits.
Explanation:
This is a valid identifier. Identifiers can start with a underscore in Python. They must
begin with a letter or an underscore.
3. continue (Invalid Identifier)
Explanation:
Explanation:
This is an invalid identifier. Identifiers cannot start with a special character in Python.
They must begin with a letter or an underscore.
3. String
4. Boolean
Q3 Indentation and Statements
Write a Python script with conditional statements (if, elif, else) to check if a given
number is positive, negative, or zero.
Unit – 2
Strings and Lists
Q1 Basic String Operations:
Unit – 3
Part 1: Dictionaries
1) Creating a Dictionary:
Modify the "city" value to represent a new city, and print the updated
dictionary.
Here is the Python code to modify the "city" value to represent a new city, and print
the updated dictionary.
Part 2: Tuples
1) Creating Tuples:
Check if a specific month is present in the tuple and print the result.
Here is the Python code to check if a specific month is present in the tuple and print
the result:
THANKYOU