Unit 2 - Lesson 1

15.1.1. Understanding Control Flow Statements

(a) Selection Statements
(c) Iterative Statements

15.1.2. Understanding If construct

num = int(input("num: "))
#write your logic here
if (num%3 == 0):
	print("divisible by 3")
	
print("End of program")

15.1.3. Understanding If construct

(b) a and b are equal.

15.1.4. Write the code

w = input("Enter the word: ")
if(w == "Rose"):
	print("True")
else:
	print("False")

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.