Python Sunday

Python Sunday

Scratchpad #3

# num = 10
# print(f"This is some calculation: {num + 10}")


# print("Amount of USD you want to convert?")
# usd = input()
# inr = int(usd) * 75

# print(inr)

# print(f"You just typed this: {usd}")

# inr = int(usd) * 75

# print(f"${usd} is equal to Rs. {inr}")


# print("Enter your name: ")
# name = input()

# name = input("Enter your name: ")

# print(type(int(name)))


# print(<class 'int'>)

# name = "john doe"   # <-- assignment
# name == "john doe"  # <-- boolean value (comparison)

# name = "jack Doe"

# if name == "John Doe":
#     print("Hello John Doe")
# elif name == "Jane Doe":
#     print("Hello Jane")
# elif name == "Jack Doe":
#     print("Hello Jack")
# else:
#     print("I have no idea")


# if name == "Mark Zuckerberg":
#     print("Hello World")
#     print("Facebook")
# elif name == "Jack Dorsey":  # else if
#     print("Twitter")
# elif name == "Sundar Pichai":
#     print("Google")
# else:
#     print("Someone I don't know")


# print("\n\nI AM OUTSIDE OF THE CONDITIONALS")


# name = " "

# if name:
#     print("Hello friend")
# else:
#     print("Is anyone there...?")


# NESTED CONDITIONALS

# age = int(input("Please enter your age: "))

# if age >= 18:
#     print("You are allowed to enter but not drink")
# elif age >= 21:
#     print("You are allowed to drink")
# elif age >= 65:
#     print("Drinks are free")
# else:
#     print("You are not allowed!")


# if age >= 18:
#     if age >= 65:
#         print("Drinks are free")
#     elif age >= 21:
#         print("You are allowed to drink")
#     else:
#         print("You are allowed to enter but not drink")
# else:
#     print("You are not allowed!")


# age = int(input("Please enter your age: "))  # 38
# city = input("Please enter your city: ")  # delhi

# if (age >= 18 and age < 21) and city != "delhi":
#     print("You are allowed to enter but not drink")
# elif (age >= 21 and age < 65) and city != "delhi":
#     print("You are allowed to drink")
# elif age >= 65 and city != "delhi":
#     print("Drinks are free")
# else:
#     print("You are not allowed!")


# if city == "delhi":
#     print("You are not allowed!")
# elif age >= 18 and age < 21:
#     print("You are allowed to enter but not drink")
# elif age >= 21 and age < 65:
#     print("You are allowed to drink")
# elif age >= 65:
#     print("Drinks are free")
# else:
#     print("You are not allowed!")


# RPS

print("...rock...")
print("...paper...")
print("...scissors...")

player1 = input("enter Player 1's choice: ")  # rock
player2 = input("enter Player 2's choice: ")  # paper


# Original

if player1 == "rock" and player2 == "scissors":
    print("Player 1 wins")
elif player1 == "paper" and player2 == "rock":
    print("Player 1 wins")
elif player1 == "scissors" and player2 == "paper":
    print("Player 1 wins")
elif player2 == "rock" and player1 == "scissors":
    print("Player 2 wins")
elif player2 == "paper" and player1 == "rock":
    print("Player 2 wins")
elif player2 == "scissors" and player1 == "paper":
    print("Player 2 wins")
elif player1 == player2:
    print("It's a tie")
else:
    print("Something went wrong")


# Refactor #1

if (
    (player1 == "rock" and player2 == "scissors")
    or (player1 == "paper" and player2 == "rock")
    or (player1 == "scissors" and player2 == "paper")
):
    print("Player 1 wins")
elif (
    (player2 == "rock" and player1 == "scissors")
    or (player2 == "paper" and player1 == "rock")
    or (player2 == "scissors" and player1 == "paper")
):
    print("Player 2 wins")
elif player1 == player2:
    print("It's a tie")
else:
    print("Something went wrong")


# Refactor #2

if player1 == player2:
    print("It's a tie!")
elif player1 == "rock":
    if player2 == "scissors":
        print("player1 wins!")
    elif player2 == "paper":
        print("player2 wins!")
elif player1 == "paper":
    if player2 == "rock":
        print("player1 wins!")
    elif player2 == "scissors":
        print("player2 wins!")
elif player1 == "scissors":
    if player2 == "paper":
        print("player1 wins!")
    elif player2 == "rock":
        print("player2 wins!")
else:
    print("Something went wrong")
# age = 14

# if age > 20:
#     if age > 30:
#         print("You are allowed and welcome")
#     elif age > 25:
#         print("You are allowed")
# else:
#     print("Not allowed")


# c[0] = r

# name = "rstforum"

# for c in name:
#     print(c)


# nums = range(1, 10)  # (1,2,3,4,5,6,7,8,9)

# for x in nums:
#     print("----")
#     print(x ** 2)
#     print("----")


# character = 'r'

# for char in "rstforum":
#     print(char)


# products = "COLLECTION"

# for product in products:
#     print(product)


# for num in range(10, 20):
#     print(num)

# for num in range(20):
#     print(num)


# "hello"[1, 5, 2]

# for num in range(0, 21, 5):  # (0, 5, 10, 15, 20)
#     print(num)


# for num in range(10, -20, -5):  # (1)
#     print(num)

# range(start=0, end, step=1)
# range(0, 10, 2)


# for i in range(10):
#     # print(i)
#     print("Hello World")


# for num in range(1, 10, 2):
#     print(num)


# Loop through numbers 1-20 (inclusive)
# for even numbers, you print, "Fizz is even"
# for odd numbers, you print, "Fizz is odd"
# for 5 and 16, print, "FizzBuzz"


# for num in range(1,21):
#     # num == 1  -> "Fizz is odd"
#     # num == 2  -> "Fizz is even"


# # for n in range(1, 21):
# #     if n % 2 ==

# 1 "Fizz is odd"
# 2 "Fizz is even"
# 3 "Fizz is odd"
# 4 "Fizz is even"
# 5 "FizzBuzz"
# 6 "Fizz is even"
# 7 "Fizz is odd"


# # Loop through numbers 1-20 (inclusive)
# for num in range(1, 21):
#     if num == 5 or num == 16:  # for 5 and 16, print, "FizzBuzz"
#         print(num, "FizzBuzz")
#     elif num % 2 == 0:  # for even numbers, you print, "Fizz is even"
#         print(num, "Fizz is even")
#     else:  # for odd numbers, you print, "Fizz is odd"
#         print(num, "Fizz is odd")


# password = input("Please enter your password: ")
# # 'hello'

# while password != "pass@123":
#     print("Incorrect password!")
#     password = input("Enter password again: ")


# print("Welcome")


# for num in range(10):
#     print(num)


# num = 0
# while num < 10:
#     print(num)
#     num += 1  # num = num + 1


name = "rstforum"

num = 0
while num < len(name):
    print(name[num])
    num += 1
# name = "John Doe"
# value = 2500
# paid = True

# # Data structures
# # collections of things

# # Lists
# tasks = "buy milk|pay electricity bill|complete labs"

# tasks = ["buy milk", "pay bill", "complete labs", 1000, True]

# product = ["iPhone", "Apple", 80000, 100]


# tasks = ["Install Python", "Install VSCode", "Setup Auto PEP8"]

# first_task = "Install Black"
# second_task = "Install VSCode Pylance extension"
# third_task = "Setup Python 3.9.1"

# tasks = [2021, first_task, second_task, third_task, "Install Windows Terminal"]


# print(tasks)
# print(type(tasks))


# print(len(tasks))


# nums_list = list(range(1, 51))

# print(nums_list)
# print(len(nums_list))


# tasks = [
#     "Install Python",
#     "Install VSCode",
#     "Setup Auto PEP8",
#     "Install Black",
#     "Install VSCode Pylance extension",
# ]

# for task in tasks:
#     print(f"Task is - {task.upper()}")


# i = 0
# while i < len(tasks):
#     print(f"Task {i + 1} - {tasks[i]}\n")
#     i += 1


# nums = list(range(1, 10))  # [1,2,3,4,5,6,7,8,9]

# for num in nums:
#     print(num ** 2)


# >>>
# >>>
# >>> name = "john"
# >>>
# >>>
# >>> len(name)
# 4
# >>>
# >>> name.upper()
# 'JOHN'
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> tasks = ["Install Python", "Install VSCode", "Setup Auto PEP8"]
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode', 'Setup Auto PEP8']
# >>>
# >>>
# >>> tasks.append("Install Windows Terminal")
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode', 'Setup Auto PEP8', 'Install Windows Terminal']
# >>>
# >>>
# >>> name.upper()
# 'JOHN'
# >>>
# >>>
# >>>
# >>> random_numbers = [1, 4, 34, 21, 86]
# >>>
# >>>
# >>> randon_numbers
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# NameError: name 'randon_numbers' is not defined
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86]
# >>>
# >>>
# >>> random_numbers.append(100)
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100]
# >>>
# >>> random_numbers.append(100)
# >>>
# >>> random_numbers.append(10)
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100, 100, 10]
# >>>
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100, 100, 10]
# >>>
# >>> random_numbers.append(100, 50, 40)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: list.append() takes exactly one argument (3 given)
# >>>
# >>>
# >>>
# >>> random_numbers.append(True)
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100, 100, 10, True]
# >>> random_numbers.append("John Doe")
# >>>
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100, 100, 10, True, 'John Doe']
# >>>
# >>> random_numbers.append(100 ** 3)
# >>>
# >>> random_numbers
# [1, 4, 34, 21, 86, 100, 100, 10, True, 'John Doe', 1000000]

# >>> nums = list(range(5))
# >>>
# >>>
# >>> nums
# [0, 1, 2, 3, 4]
# >>>
# >>>
# >>> nums.append([5,6,7,8])
# >>>
# >>> nums
# [0, 1, 2, 3, 4, [5, 6, 7, 8]]
# >>>
# >>>
# >>> len(nums)
# 6
# >>>
# >>> nums[-1]
# [5, 6, 7, 8]
# >>>
# >>> nums = list(range(5))
# >>>
# >>>
# >>>
# >>> nums
# [0, 1, 2, 3, 4]
# >>>
# >>>
# >>> nums.extend([5,6,7,8,9,10])
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# >>>
# >>> len(nums)
# 11
# >>>
# >>>
# >>>
# >>> nums.extend([100, True, False, "john doe"])
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe']
# >>>
# >>> nums.extend(list(range(100,110)))
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe', 100, 101, 102, 103, 104, 105, 106, 107, 108, 109]
# >>>
# >>>
# >>>

# >>> nums.insert(0, "Hello World")
# >>>
# >>> nums
# ['Hello World', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe', 100, 101, 102, 103, 104, 105, 106, 107, 108, 109]
# >>>
# >>>
# >>>
# >>> nums.insert(3, 1.111112)
# >>>
# >>> nums
# ['Hello World', 0, 1, 1.111112, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe', 100, 101, 102, 103, 104, 105, 106, 107, 108, 109]
# >>>
# >>>
# >>> nums.insert(-1, "ENDING")
# >>>
# >>> nums
# ['Hello World', 0, 1, 1.111112, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe', 100, 101, 102, 103, 104, 105, 106, 107, 108, 'ENDING', 109]
# >>>
# >>>
# >>>
# >>> nums
# ['Hello World', 0, 1, 1.111112, 2, 3, 4, 5, 6, 7, 8, 9, 10, 100, True, False, 'john doe', 100, 101, 102, 103, 104, 105, 106, 107, 108, 'ENDING', 109]
# >>>
# >>>
# >>>
# >>> nums.clear()
# >>>
# >>> nums
# []
# >>>
# >>> bool(nums)
# False

# >>> tasks = ["Install Python", "Install VSCode", "Setup Auto PEP8"]
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode', 'Setup Auto PEP8']
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> tasks.pop()
# 'Setup Auto PEP8'
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode']
# >>>
# >>>
# >>>
# >>> deleted_item = tasks.pop()
# >>>
# >>> delete_item
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# NameError: name 'delete_item' is not defined
# >>>
# >>> deleted_item
# 'Install VSCode'
# >>>
# >>> tasks
# ['Install Python']
# >>>
# >>>
# >>>
# >>> tasks = ["Install Python", "Install VSCode", "Setup Auto PEP8"]
# >>>
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode', 'Setup Auto PEP8']
# >>>
# >>>
# >>> tasks(1)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: 'list' object is not callable
# >>>
# >>> tasks.pop(1)
# 'Install VSCode'
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Setup Auto PEP8']
# >>> tasks.pop(0)
# 'Install Python'
# >>>
# >>>
# >>> tasks
# ['Setup Auto PEP8']
# >>>
# >>> tasks = ["Install Python", "Install VSCode", "Setup Auto PEP8"]
# >>>
# >>>
# >>> tasks
# ['Install Python', 'Install VSCode', 'Setup Auto PEP8']
# >>>
# >>>
# >>> task.remove("Install Python")
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# NameError: name 'task' is not defined
# >>>
# >>>
# >>> tasks.remove("Install Python")
# >>>
# >>> tasks
# ['Install VSCode', 'Setup Auto PEP8']
# >>>
# >>> tasks.remove("Install Python")
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# ValueError: list.remove(x): x not in list
# >>>
# >>> tasks.remove()
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: list.remove() takes exactly one argument (0 given)
# >>>
# >>> tasks
# ['Install VSCode', 'Setup Auto PEP8']
# >>>
# >>> tasks.remove("Setup Auto POP8")
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# ValueError: list.remove(x): x not in list
# >>>
# >>> tasks.remove("Setup Auto PEP8")
# >>>
# >>> tasks
# ['Install VSCode']


# >>> tasks = [
# ...     "Install Python",
# ...     "Install VSCode",
# ...     "Setup Auto PEP8",
# ...     "Install Black",
# ...     "Install VSCode Pylance extension",
# ... ]
# >>>
# >>>
# >>>
# >>>
# >>> tasks = [
# ...     "Test 1",
# ...     "Install Python",
# ...     "Install VSCode",
# ...     "Test 1",
# ...     "Install Black",
# ...     "Setup Auto PEP8",
# ...     "Install Black",
# ...     "Install VSCode Pylance extension",
# ...     "Practice Lab",
# ...     "Test 1"
# ...     "Install VSCode",
# ...     "Install Black",
# ...     "Install VSCode Pylance extension",
# ... ]
# >>>
# >>>
# >>>
# >>> tasks
# ['Test 1', 'Install Python', 'Install VSCode', 'Test 1', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Install VSCode Pylance extension', 'Practice Lab', 'Test 1Install VSCode', 'Install Black', 'Install VSCode Pylance extension']
# >>>
# >>> len(tasks)
# 12
# >>>
# >>>
# >>> tasks.index("Test 1")
# 0
# >>>
# >>> tasks.index("Install Black")
# 4
# >>>
# >>> tasks
# ['Test 1', 'Install Python', 'Install VSCode', 'Test 1', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Install VSCode Pylance extension', 'Practice Lab', 'Test 1Install VSCode', 'Install Black', 'Install VSCode Pylance extension']
# >>>
# >>>
# >>> tasks.index("Test 1")
# 0
# >>>
# >>>
# >>> tasks.index("Test 1", 2)
# 3
# >>> tasks.index("Test 1", 2, 8)
# 3
# >>> tasks.index("Install Black", 2, 8)
# 4
# >>>
# >>> tasks.index("Install Black", 5, 8)
# 6
# >>> tasks.index("Install Black", 7, 10)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# ValueError: 'Install Black' is not in list
# >>>
# >>>
# >>>
# >>> tasks
# ['Test 1', 'Install Python', 'Install VSCode', 'Test 1', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Install VSCode Pylance extension', 'Practice Lab', 'Test 1Install VSCode', 'Install Black', 'Install VSCode Pylance extension']
# >>>
# >>>
# >>>
# >>> tasks.count("Test 1")
# 2
# >>>
# >>> tasks.count("Install Black")
# 3
# >>>
# >>> tasks.count("Install Bla")
# 0
# >>>
# >>> tasks.count("Install Python")
# 1
# >>>
# >>> \
# ...
# >>>
# >>>
# >>>
# >>>
# >>> tasks
# ['Test 1', 'Install Python', 'Install VSCode', 'Test 1', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Install VSCode Pylance extension', 'Practice Lab', 'Test 1Install VSCode', 'Install Black', 'Install VSCode Pylance extension']
# >>>
# >>> tasks.reverse()
# >>>
# >>> tasks
# ['Install VSCode Pylance extension', 'Install Black', 'Test 1Install VSCode', 'Practice Lab', 'Install VSCode Pylance extension', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Test 1', 'Install VSCode', 'Install Python', 'Test 1']
# >>>
# >>>
# >>>
# >>> nums = list(range(10))
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>> nums.reverse()
# >>> nums
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> nums
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>>
# >>> nums.sort()
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>> tasks
# ['Install VSCode Pylance extension', 'Install Black', 'Test 1Install VSCode', 'Practice Lab', 'Install VSCode Pylance extension', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Test 1', 'Install VSCode', 'Install Python', 'Test 1']
# >>>
# >>>
# >>>
# >>> names = ['john', 'mohsin', 'suyog', 'deepak', 'yashika', 'sandeep', 'umesh', 'akshay']
# >>>
# >>> names
# ['john', 'mohsin', 'suyog', 'deepak', 'yashika', 'sandeep', 'umesh', 'akshay']
# >>>
# >>> names.sort()
# >>>
# >>> names
# ['akshay', 'deepak', 'john', 'mohsin', 'sandeep', 'suyog', 'umesh', 'yashika']
# >>>
# >>> l = [True, False, 123, "john"]
# >>>
# >>> l.sort()
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: '<' not supported between instances of 'str' and 'bool'
# >>>
# >>>
# >>>
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>>
# >>> nums.reverse()
# >>>
# >>> nums
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>>
# >>>
# >>>
# >>> "-".join("john")
# 'j-o-h-n'
# >>>
# >>> "-".join([1,2,3,4])
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: sequence item 0: expected str instance, int found
# >>>
# >>> "-".join(nums)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: sequence item 0: expected str instance, int found
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> "".join(nums)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: sequence item 0: expected str instance, int found
# >>>
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> "".join()
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: str.join() takes exactly one argument (0 given)
# >>> "".join(nums)
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: sequence item 0: expected str instance, int found
# >>>
# >>>
# >>>
# >>>
# >>> "".join(tasks)
# 'Install VSCode Pylance extensionInstall BlackTest 1Install VSCodePractice LabInstall VSCode Pylance extensionInstall BlackSetup Auto PEP8Install BlackTest 1Install VSCodeInstall PythonTest 1'
# >>>
# >>>
# >>>
# >>>
# >>> nums
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>>
# >>>
# >>> "".join(["john", "jack", "jane"])
# 'johnjackjane'
# >>>
# >>> "____".join(["john", "jack", "jane"])
# 'john____jack____jane'
# >>>
# >>>
# >>>
# >>> "" + 12
# Traceback (most recent call last):
#   File "<stdin>", line 1, in <module>
# TypeError: can only concatenate str (not "int") to str
# >>>
# >>>
# >>> "____".join(["john", "jack", "jane"])
# 'john____jack____jane'
# >>>
# >>> tasks
# ['Install VSCode Pylance extension', 'Install Black', 'Test 1Install VSCode', 'Practice Lab', 'Install VSCode Pylance extension', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Test 1', 'Install VSCode', 'Install Python', 'Test 1']
# >>>
# >>>
# >>>
# >>> "____".join(tasks)
# 'Install VSCode Pylance extension____Install Black____Test 1Install VSCode____Practice Lab____Install VSCode Pylance extension____Install Black____Setup Auto PEP8____Install Black____Test 1____Install VSCode____Install Python____Test 1'
# >>>
# >>> tasks
# ['Install VSCode Pylance extension', 'Install Black', 'Test 1Install VSCode', 'Practice Lab', 'Install VSCode Pylance extension', 'Install Black', 'Setup Auto PEP8', 'Install Black', 'Test 1', 'Install VSCode', 'Install Python', 'Test 1']
# >>>
# >>>
# >>>
# >>>
# >>>
# >>> nums
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>>
# >>>
# >>> nums.sort()
# >>>
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>>
# >>>
# >>>
# >>> nums[1]
# 1
# >>>
# >>> nums[1:]
# [1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>> nums[5:]
# [5, 6, 7, 8, 9]
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>>
# >>> nums[5:8]
# [5, 6, 7]
# >>>
# >>> nums[:8]
# [0, 1, 2, 3, 4, 5, 6, 7]
# >>>
# >>> nums[:]
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>> nums_copy = nums[:]
# >>>
# >>>
# >>> nums_copy
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>>
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>>
# >>> nums[6:-1]
# [6, 7, 8]
# >>>
# >>>
# >>> nums[0:-1]
# [0, 1, 2, 3, 4, 5, 6, 7, 8]
# >>>
# >>> nums[:]
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# >>>
# >>> nums[::2]
# [0, 2, 4, 6, 8]
# >>>
# >>> nums[::3]
# [0, 3, 6, 9]
# >>>
# >>>
# >>>
# >>> nums[::-1]
# [9, 8, 7, 6, 5, 4, 3, 2, 1, 0]
# >>>
# >>> nums
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]


# tasks = [
#     "Test 1",
#     "Install Python",
#     "Install VSCode",
#     "Test 1",
#     "Install Black",
#     "Setup Auto PEP8",
#     "Install Black",
#     "Install VSCode Pylance extension",
#     "Practice Lab",
#     "Test 1"
#     "Install VSCode",
#     "Install Black",
#     "Install VSCode Pylance extension",
# ]