<file_sep># For loops
# z = range(1, 5)
# for x in z:
#     print(x)

# While Loop
# x = 0
# while x < 5:
#     print(x)
#     x += 1

x = 0
while True: # Infinite Loop
    if x > 4:
        break
    print(x)
    x += 1
<file_sep>name = 'Abid'
age = 25
salary = 15.5  # Earning in Ks

print(name, age, salary)
print(' My name is ' + name + ' and my age is ' + str(age) + ' and I earn ' + str(salary) + 'K per month')
<file_sep>"""
List, Tuples, Dicts
"""

# List
# l = [1, 5, 2, 19, 5, 25]
# ls = ['A', 'Ad', 'AD']
# l.append(51)
# l.append(11)
# print(l)
# l.sort()
# f = l.pop()
# print(f)
# print(l)

# # Tuples
# t = (1, 4, 5)
# t[1] = 99
# print(t)
#
# import time
# print(time.localtime())

# Dict
d = {}
d = {'name': 'Adnan', 'Education': 'BS', 'Height': 5.8}
person = []
person.append({'name': 'Adnan', 'Education': 'BS', 'Height': 5.8})
person.append({'name': 'Ali', 'Education': 'MA', 'Height': 4.8})

for p in person:
    print(p['name'], p['Education'])

#
#
# t = (1, 2)
# l = [1, 3, 4, 5, 1, 25, 13]
# print(time.localtime())
# l.reverse()
# print(l)
<file_sep>def f1():
    print("Hi")


def f2(name):
    print('Hi ' + name)


def f3(name):
    return name


def f4():
    return 1, 2


x, x1 = f4()
print(x)
print(x1)
<file_sep>salary = 20.5
age = 30
name = 'Abid'

if salary > 15.5 and age > 20 and name == 'Abid':
    print('Wow you earn a lot')
else:
    print('Umm Sorry. Work Hard!')
<file_sep>try:
    a = 4 / 0
except Exception as ex:
    print(str(ex))
finally:
    print('Thats all Folks')


<file_sep># file_read = open('LICENSE')
# #print(file_read.read())
# print(len(file_read.readlines()))

write = open('myfile.txt', 'a')
write.write('Hi there\n')
write.close()
<file_sep>a = '<NAME>'
# print(len(a))
# print(a[0:1])
# print(a[2:5])
# b = 'Hi '
# print(b * 3)
multi = """
Hello
Hi
How are you doing today
"""
salary = 300
a = 'Hi I am Jon and I earn ' + str(salary) + ' per month'
a = 'Hi I am {0} and I earn {1} per month'.format('Jon', salary)
print(a)
<file_sep>import sys

args = sys.argv
if len(args) != 2:
    print('This is not the correct format')
else:
    number = int(args[1])
    if number < 10:
        print(' It is less than 10')
    else:
        print('Something else')
<file_sep># Printing Name
a = 'Adnan'
print(a)
