Page 84 - Dig_CodeAI_V2.1_Class_7
P. 84
6
More on Python
Learning Outcomes
Data Types Comments in Python
Operators Precedence of Operators
Conditional Statements if Statement
if...else Statement Nested if Statement
if...elif...else Ladder Some More Programs
Critical Thinking
What will be the output of the following Python codes:
1. x = 3
y = 2
print ('Sum of',x,'and',y,'is',x+y)
2. days = int(input("Enter days: "))
months = days / 30
days = days % 30
print("Months = ",int(months),
"Days = ", days)
82 DigiCode AI (Ver. 2.1)-VII

