<jupyter_start><jupyter_text>Welcome to the "Fundamental of Information Retrieval & Web Search" Course!I'm <NAME>, your TA for this semester.In this session we're going to practice Python together, so let's begin!  Hello World<jupyter_code>print("Hello World!!")<jupyter_output>Hello World!!<jupyter_text>Simple data types<jupyter_code>var1 = 20
var2 = 20.2
var3 = 'H'
var4 = 'hey'
var5 = "hey"
print(var1)
print(type(var1))
type(var1)
print(var2)
print(type(var2))
type(var2)
print(var3)
print(type(var3))
type(var3)
print(var4)
print(type(var4))
type(var4)
print(var5)
print(type(var5))
type(var5)
var5
var4
var6 = 5 + 2j
print(var6)
type(var6)
var7 = range(10)
print(var7)
var8 = True
var8
var9 = b"hi there"
var9<jupyter_output><empty_output><jupyter_text>Operators<jupyter_code>op1 , op2, op3, op4 = 1, 2, 3, 4
print(op1, op2, op3, op4)
print(op1, op2)
op1, op2 = op2, op1
print(op1, op2)
op3 * op4
op3 ** op4
op4 / op3
op4 // op3
op4 % op3
op3 is op4
op3 is not op4
op3 in [1,2,3,4]
op3 in [1, 2, 4]
op3.__eq__(op4)
op3 != op4
op3 == op4
op3 >= op4
op3 <= op4
op3 > op4
op3 < op4
op3 *= 2
op3
op3 -= 1
op3
"%d" %op4
"%f" %op4
"%.1f" %op4
"%.0f" %op4
"%2.0f" %op4
"%4.1f" %op4
"%e" %op4
"%2e" %op4
"%20e" %op4
"%.20e" %op4
"{}".format(op4)
"{}".format(op4)
"{}".format(float(op4))
"{}".format(complex(op4))
"{}".format(int(op4))<jupyter_output><empty_output><jupyter_text>Input system<jupyter_code>inp1 = input("enter a number:")
type(inp1)
inp2 = eval(input("enter a number:"))
type(inp2)
print("hi \nhow are you?")
print(r"hi \n how are you?")<jupyter_output>hi 
how are you?
hi \n how are you?<jupyter_text>Control flow<jupyter_code>op = eval(input())
if op > 10:
    print("Bigger than 10")
elif op == 10:
    print("Equal to 10")
else:
    print("less than 10")<jupyter_output>Bigger than 10<jupyter_text>Loop<jupyter_code>flag = True
while flag:
    print("hiiiii")
    flag = False
li = [1, 2.0, "three"]
for item in li:
    print(item)
li = [1, 2.0, "three"]
for index in range(0, 3):
    print(li[index])
for index in range(len(li)):
    print(li[index])
for index in range(0, 3, 2):
    print(li[index])
for index in range(3, 0, -1):
    print(index)<jupyter_output>3
2
1
{'fraction_non_alphanumeric': 0.17657822506861848, 'fraction_numerical': 0.07410795974382434, 'mean_word_length': 5.143258426966292, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 25, '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': '473863', 'license': 'MIT', 'n_tokens_mistral': 1054, 'n_tokens_neox': 1012, 'n_words': 255, 'path': 'Intro to python/IntroToPy.ipynb', 'repo_name': 'VRU-CE/Information_Retrieval-4002', 'size': '2196'}