<jupyter_start><jupyter_text><jupyter_code><jupyter_output><empty_output><jupyter_text>Welcome to Python FundamentalsIn this module, we are going to establish or review our skills in Python programming. In this notebook we are going to cover:* Variables and Data Types * Operations* Input and Output Operations* Logic Control* Iterables* Functions  Variable and Data Types<jupyter_code>x = 1
a,b = 0, -1
x
type(x)
y = 1.0
type(y)
x = float(x)
type(x)
s,t,u = "0", '1', 'one'
type(s)
s_int = int(s)
s_int
type(s)<jupyter_output><empty_output><jupyter_text>Operations Arithmetic<jupyter_code>a,b,c,d = 2.0, -0.5, 0, -32
#Addition
S = a+b
S
###Subtraction
D = b-d
D
### Floor Division
Fq = a//b
Fq
### Exponentiation
E = a**b
E
### Modulo
mod = d%a
mod<jupyter_output><empty_output><jupyter_text>Assignment Operations<jupyter_code>G, H, J, K = 0, 100, 2, 2
G += a
G
H -= d
H
J *= 2
J
K **= 3
K<jupyter_output><empty_output><jupyter_text>Comparators<jupyter_code>res_1, res_2, res_3 = 1, 2.0, "1"
true_val = 1.0
## Equality
res_1 == true_val
##Non-equality
res_2 != true_val
## Innequality
t1 = res_1 > res_2
t2 = res_1 < res_2/2
t3 = res_1 >= res_2/2
t4 = res_1 <= res_2
t4<jupyter_output><empty_output><jupyter_text>Logical<jupyter_code>res_1 == true_val
res_1 is true_val
res_1 is not true_val
p, q = True, False
conj = p and q
conj
p, q = True, False
disj = p or q
disj
p, q = True, False
nand = not (p and q)
nand
p, q = True, False
xor = (not p and q) or (p and not q)
xor<jupyter_output><empty_output><jupyter_text>I/O<jupyter_code>print("Hello World")
cnt = 1
string = "Hello World"
print(string, ", Current count is:", cnt)
cnt += 1
print(f"{string}, Current count is: {cnt}")
sem_grade = 90
name = "yumi"
print("Hello {}, your semestral grade is: {}".format(name, sem_grade))
w_pg, w_mg, w_fg = 0.3, 0.3, 0.4
print("The weights of your semestral grade are:\ ")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1429324894514768, 'fraction_numerical': 0.03217299578059072, 'mean_word_length': 5.199346405228758, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '7', 'dir': 'jupyter-structured-clean-dedup', 'id': '117019', 'license': 'Apache-2.0', 'n_tokens_mistral': 840, 'n_tokens_neox': 809, 'n_words': 231, 'path': 'Activity_1_Phyton_Fundamentals.ipynb', 'repo_name': 'Ayomx/Linear-Algebra_ChE_2nd-Sem-2021-2022', 'size': '1896'}