Python Assignment
Python Assignment
result_multiply = 3 * 3
result_exponent = 3 ** 3
print("3 * 3 =", result_multiply)
print("3 ** 3 =", result_exponent)
3*3=9
3 ** 3 = 27
Explanation:
- * performs multiplication.
- ** raises a number to the power of another (exponentiation).
(c) Is it possible to display an integer like 09?
Code:
Explanation: In Python, leading zeros are not allowed in integers because it creates
ambiguity with octal (base-8) numbers.
<class 'str'>
<class 'int'>
Explanation: '67' is treated as a string (text data), while 67 is treated as an integer (numeric
data).
age = 22
result = age * 2
print("Your age multiplied by 2 is:", result)
Output:
city = "Sokoto"
country = "Nigeria"
continent = "Africa"
print("City:", city)
print("Country:", country)
print("Continent:", continent)
Output:
City: Sokoto
Country: Nigeria
Continent: Africa
Output:
Examination Schedule:
Start Date: 09 January 2025
End Date: 12 January 2025