Posts

Python Notes #6 Functions

 Hi Everyone, Today I'm doing functions I have kept this as its own blog as this is a bit of a tougher topic and for my own memory I'd like to be able to find this easily if I ever had to review python notes. A function is a chunk of reusable code this means that the code can be created and then passed anywhere within the code later on. This is how a function works -  def name(first, last): print("Please enter name: ") print(f"Your name is: {first} {last}") name("Iain", "H") In this chunk of code I pass the parameters first & last within the function - from here I create a print statement asking for my name, notice how in the second print statement I am passing the parameters first and last (represented by the curly braces) and lastly I call the function name and define the values within the brackets - with the last statement now first will = 'Iain' and last will = 'H'. This code produces this output - Please enter

Python Notes #5 List, Tuple, Set, Dictionary, input, while

 Hi Everyone! Today I have another note dump I need to make up, these are taking me longer to post because im learning nearly all of this practically I would have to post my code then individually explain each chunk of code and that just takes to long.  List []  is a collection which is ordered and changeable. Allows duplicate members. Tuple ()  is a collection which is ordered and unchangeable. Allows duplicate members. Set {}  is a collection which is unordered and unindexed. No duplicate members. Dictionary {key:value}  is a collection which is unordered and changeable. No duplicate members. for *variable* in *already created variable*:     print("") input() - use to get input from user. When using this function the value will be stored as a STRING regardless if you enter a number, if you enter the value 7 the value will be stored as string "7". Example - enter_age = input() int() - converts a string variable to an integer. Example - enter_age = int(enter_age) M

Python Crash Course for loops! #4

 Hi Everyone, This is what I have been messing about with tonight, just doing loops over and over again!  for loops are made up of the variable and value: pizza = ["pep", "cheese", "donner"] for pizzas in pizza : print(f"I like {pizzas.upper()}") print(f"My fav type of pizza is {pizza[0]}") animals = ["Dog", "Cat", "Chicken"] for pets in animals: print(f"{pets} are my fav!") print(f"a {pets} would make a great pet") print("These animals are great!") In this code the value of pizzas is the variable and is getting assigned the value of pizza, the next statement is then indented and printed.

Python Crash Course Lists Methods! #3

 Hi Everyone, Dumping more notes today for my own reference! Need more practice with these. Modifying Elements in a List -  The syntax for modifying an element is similar to the syntax for accessing an element in a list. To change an element, use the name of the list followed by the index of the element you want to change, and then provide the new value you want that item to have. motorcycles[0] = 'ducati' Appending Elements to the End of a List -  The simplest way to add a new element to a list is to append the item to the list. When you append an item to a list, the new element is added to the end of the list. Using the same list we had in the previous example, we’ll add the new element 'ducati' to the end of the list: motorcycles.append('ducati') Inserting Elements into a List -  You can add a new element at any position in your list by using the insert() method. You do this by specifying the index of the new element and the value of the new item. motorcycles

Python Crash Course Lists & Notes! #2

Hi Everyone,  These are just the notes I have been taking whilst learning Python I will apologise in advance as they are a bit of a mess due to my word license running out! So I am using this as a sort of substitute for a notes dump.  Data Types - Int - Whole number. Float - Decimal Number.  Constant - written in all caps. Constants never change. Methods -  f = To insert a variable’s value into a string, place the letter f immediately before the opening quotation mark. .rstrip - takes whitespace away from right side. .lstrip - takes whitespace away from left side. . strip - takes whitespace away. .upper - sets strings to capital text.  .lower - sets strings to lower text. .title = puts makes each word first letter capital  .append - for lists . insert - for lists .pop - for lists. Takes item specified by index and prints it (or "pops" it) example - .pop(0) will print first value. .remove - used for lists. Removes specified index value.  \t = tab \ n = new line  Lis

Python Crash Course Chapter 1-2! #1

 Hi Everyone,  As a continuation from my CCNA I have started studying towards my Cisco DevNet, to do this I need some prior knowledge with Python (which I dont have) so after doing some research I have found this book! I will be using this until I am comfortable with Python.  In the first two chapters I have learned how to create variables and assigned them values, along with this I have also learned how to use methods with the variables. These are some examples of me beginning my Python journey -  blog_message = "Hi everyone! My name is" name = "Iain" first_blog = "this is my first blog about Pyhton, enjoy!" day, month, year = 29, 11, 2020 print(f"{blog_message.title()} {name.upper()} {first_blog.title()} {day, month, year}") This is my first piece of coding, in this I got to use variables, methods and integers. 

I PASSED! Cisco CCNA 200-301! Experience & Where I'm going from here!

 Hi Everyone, Long time no see. As the title says - I passed! After all the studying I have finally finished my CCNA on November 27th. So as a summary I managed to score 900/1000 - what do I think of the exam? I think that the exam focuses on a much wider spectrum than just R&S, I had an illusion in my head that most questions on the exam would revolve around R&S protocols when this wasn't the case at all! I had a majority of wireless questions is regards to WLC's, AP's etc (without going into to much detail - sorry guys blame the NDA) along with this there was other things that were involved that weren't on the blueprint which was mildly frustrating. My Advice? Learn all the gritty details, learn how to read routing tables things like longest prefix, AD, metric - what path will win? Learn protocol numbers, what the requirements for that protocol are to make a decision e.g how HSRP uses an active and standby router and how it decides what router is doing what. B