<jupyter_start><jupyter_text>Control Flow    if, else & elif        OTHER Languages:      if (logic){        value_if_True    }    else{        value_if_False    }    PYTHON:         if logic:        value_if_True    else:        value_if_False<jupyter_code>if True:
    print("Pakistan")
else:
    print("Zinda bad")
if False:
    print("Pakistan")
else:
    print("Zinda bad")
x = int(input("Please enter an integer: "))

if x < 0:
    x = 0
    print('Negative changed to zero')
elif x == 0:
    print('Zero')
elif x == 1:
    print('Single')
else:
    print('More')
user = input("User: ")
password = input("Pass: ")

if (user=="Yasir" or user=="Haseeb") and password=="<PASSWORD>":
    print("Valid User!")
else:
    print("Invalid User")
user = input("User: ")
password = input("Pass: ")

if (user in ['amir',"akram","haseeb"]) and password=="<PASSWORD>":
    print("Valid User!")
else:
    print("Invalid User")<jupyter_output>User: akram
Pass: <PASSWORD>
Valid User!<jupyter_text>Loop    While    For statement  While    Counter    Logic    Increment / Decrement<jupyter_code>counter = 1 # Counter

while counter <= 10: #Logic
    print("line no",counter)
    counter += 1 # Increment
counter = 10 #counter
while counter>=1: #logic
    print("line no", counter)
    counter -= 1 # Decrement<jupyter_output>line no 10
line no 9
line no 8
line no 7
line no 6
line no 5
line no 4
line no 3
line no 2
line no 1<jupyter_text>for loop<jupyter_code># print each strings of list:
words = ['cat', 'window', 'defenestrate']
for w in words:
    print(w)
# print and count each strings of list:
words = ['cat', 'window', 'defenestrate']
for w in words:
    print(w, len(w))<jupyter_output>cat 3
window 6
defenestrate 12<jupyter_text>Range Function arange(5, 10)   ---> 5, 6, 7, 8, 9range(0, 10, 3)   ---> 0, 3, 6, 9range(-10, -100, -30)   ---> -10, -40, -70<jupyter_code>range(-10, -100, -30)

for i in range(5):
    print(i)
a = ['Mary', 'had', 'a', 'little', 'lamb']
for i in range(len(a)):
    print(i, a[i])
sum(range(4))
list(range(4))
for i in range(1,11):
    #print(2,"X",i,"=",i*2)
    #print("2 X "+str(i)+" = "+str(i*2))
    print(f"2 X {i} = {i*2}") #string formatting
for i in range(10,0,-1):
    #print(2,"X",i,"=",i*2)
    #print("2 X "+str(i)+" = "+str(i*2))
    print(f"2 X {i} = {i*2}") #string formatting
#user = int(input("Enter no"))
user = input("Enter no for table: ") # by default input will be in string
user = int(user)
for t in range(1, user+1): #eg: 4+1 =5 how many tables should br printes
    for n in range(1,11): # counting from 1 to 10
        print(f"{t} X {n} = {t*n}")
#user = int(input("Enter no"))
user = input("Enter no for tables: ") # by default input will be in string
user = int(user)
for t in range(1, 11): #eg: 4+1 =5 how many tables should br printes
    for n in range(1,user+1): # counting from 1 to 10
        print(f"{t} X {n} = {t*n}", end="\t")
    print("")
# Task
# Make a table which ask user how many table you want to draw and also the ending point.
uc = int(input("Enter Table no: "))
ur = int(input("Enter Last value: "))

for r in range(1,ur+1):
    for c in range(1, uc+1):  
        print(f"{c} X {r} = {c*r}", end="\t")
    print()<jupyter_output>Enter Table no: 3
Enter Last value: 5
1 X 1 = 1	2 X 1 = 2	3 X 1 = 3	
1 X 2 = 2	2 X 2 = 4	3 X 2 = 6	
1 X 3 = 3	2 X 3 = 6	3 X 3 = 9	
1 X 4 = 4	2 X 4 = 8	3 X 4 = 12	
1 X 5 = 5	2 X 5 = 10	3 X 5 = 15<jupyter_text>break and continue Statements, and else Clauses on Loops<jupyter_code>for n in range(2, 10):
    for x in range(2, n):
        if n % x == 0:
            print(n, 'equals', x, '*', n//x)
            break
    else:
        # loop fell through without finding a factor
        print(n, 'is a prime number')


for num in range(2, 10):
    if num % 2 == 0:
        print("Found an even number", num)
        continue
    print("Found an odd number", num)<jupyter_output>Found an even number 2
Found an odd number 3
Found an even number 4
Found an odd number 5
Found an even number 6
Found an odd number 7
Found an even number 8
Found an odd number 9<jupyter_text>Pass statements    The pass statement does nothing. It can be used when a statement is required syntactically but the program requires no action.<jupyter_code>while True:
    pass  # Busy-wait for keyboard interrupt (Ctrl+C)

class MyEmptyClass:
    pass

def initlog(*args):
    pass   # Remember to implement this!<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14890246662140755, 'fraction_numerical': 0.04050690201403032, 'mean_word_length': 3.18957345971564, 'pattern_counts': {'":': 2, '<': 25, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '339249', 'license': 'MIT', 'n_tokens_mistral': 1757, 'n_tokens_neox': 1625, 'n_words': 591, 'path': 'Day_4(Python).ipynb', 'repo_name': 'HaseebRajput007/100DaysOfCode-DataScience', 'size': '4398'}