<jupyter_start><jupyter_text>Hello World! In Programing the first thing usually taught is how to print out Hello World! to the screen, so lets do that.<jupyter_code>print("Hello World!")<jupyter_output>Hello World!<jupyter_text>CommentsIn programming comments are used to explain what a line of code does. This increases readability both for the programmer and a stranger comming to read the code for the first time.<jupyter_code># This is a comment<jupyter_output><empty_output><jupyter_text>Arithmetics in Python To perform arithmetic operations in python we use aritnmetic operators for this purposes. The aritmetic operators are Addition(+), Subtraction(-), Multiplication( * ), Division(/), Modululs(%), Exponent( ** )<jupyter_code>#Addition
5 + 5
# Subtraction
10 - 5
# Multiplication
3 * 5
# Division
10 / 2
# Modulus ( remainder )
18 % 7
18 / 7
# Exponents (raised to power)
4 ** 2
5 ** 5<jupyter_output><empty_output><jupyter_text>Variable AssingmentsTo assign a variable in python all we have to do is to type the variable name and give it a value. For example:<jupyter_code>x = 5
print(x)
x = 10
print(x)<jupyter_output>10<jupyter_text>Variables can be used to perform math operations in place of numbers. For example:<jupyter_code>num = 10
mul = 2

print(num * mul)
print(num * x)<jupyter_output>100<jupyter_text>Data TypesTheir are several data types in python. Examples are: Their are 4 data types in python* Intergers ( Whole Numbers)* Floats ( Decimals and Fraction )* Strings ( Text )* Booleans ( True or False )<jupyter_code>type1 = 100 # Integer
type2 = 1.1 # Float
type3 = "This program is brought to you by 'COLPHYS and CCCTI'" # Strings
type4 = True # boolean 1
type5 = False # boolean 2
print(type3)<jupyter_output>This program is brought to you by 'COLPHYS and CCCTI'<jupyter_text>In python you can check the data type of an already defined variable by just using the function `type()`<jupyter_code>type(type4)
type(type3)<jupyter_output><empty_output><jupyter_text>Just as operation can be performed on numbers in Python we can also perform addition on strings also. This is called concatenation. Concatenation is the process of joining two strings together<jupyter_code>string1 = "COLPHYS & "
string2 = "CCTI"

result = string1 + string2
print(result)<jupyter_output>COLPHYS & CCTI<jupyter_text>To repeat string use the multiplication operator `*`<jupyter_code>result2 = string1 * 3
print(result2)<jupyter_output>COLPHYS & COLPHYS & COLPHYS &<jupyter_text>In Python it is possible to change the data type of a particular variable using functions like.* str() - changes a variable to a string* float() - changes a variable to a float* int() - changes a variable to an integer* bool() - changes a variable to boolean<jupyter_code>data =  "1.0000"
type(data)
data1 = float(data)
print(data1)
type(data1)<jupyter_output>1.0<jupyter_text>Python Lists In programming a list is an example of what we call a complex data type.<jupyter_code>a = "is"
b = "nice"
my_list = ["my", "list", a, b]
my_list
# to define a list in python  all you have to use is square brackets []
new_list = [1, 2, 3, 4, 5, "One", "Two", "Three", "Four", "Five", True, False ]
new_list<jupyter_output><empty_output><jupyter_text>A python list can contain more than one data type<jupyter_code>one = 1.0
two = 2.0
three = 3.0
numbers = [one, two, three, "One", "Two", "Three"]
numbers
# Also a list can also contain a list in python

a = [1, 2, 3, 4, 5]
b = ["one", "two", "three", "four", "five"]
c = [1.0, 2.0, 3.0, 4.0, 5.0]

list1 = [a, b, c]
list1
# List Indexing
new_list
new_list[0]
new_list[11]
new_list[-1]
new_list[-3]
list1
list1[2]
list1[2][3]
numbers
# List Slicing

numbers[0:] # from index 0 upstairs
numbers[4:] # from index 4 upstairs
numbers[0:5] # from index 0 to index 4
numbers[1:5] # from index 1 to index 4
numbers[:5] # from index 4 downstairs
print(numbers[:]) # Every element in the list.
# Changing values of elements in a list

# Using the numbers list
numbers[-1] = "three"
print(numbers)
# Appending elements to a list

numbers1 = numbers + ["Four", "Five"]

print(numbers1)
# Deleting elements in a list
# To delete an element in a list you use the delete function [del()]

del(numbers1[-2])

print(numbers1)<jupyter_output>[1.0, 2.0, 3.0, 'One', 'Two', 'three', 'Five']
{'fraction_non_alphanumeric': 0.10696807271032394, 'fraction_numerical': 0.030295968305756232, 'mean_word_length': 5.220289855072464, 'pattern_counts': {'":': 0, '<': 41, '<?xml version=': 0, '>': 41, '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': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '662794', 'license': 'MIT', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1436, 'n_words': 550, 'path': 'files/Python Crash Course 1.ipynb', 'repo_name': 'Koladebamidele/Khay', 'size': '4291'}