Fellowship Pre-Program Assessment



This assessment aims to gauge an applicant’s ability to learn independently, engage in exploratory problem-solving to apply new knowledge to tasks, be a resourceful learner, and demonstrate foundational computer literacy skills. It should take approximately 45 - 60 minutes to complete.


The assessment is for The Innovation Fellowship and The Technology Fellowship. Most of the assessment focuses on short introductory lessons about the programming language Python followed by multiple-choice questions and a few broadly applicable questions about design, networking, and logic. No previous programming knowledge is required to complete this assessment. While not all tracks will use Python, this assessment style provides an ideal asynchronous educational experience for our team to assess the qualifications listed above.


You can return to any part of the assessment before submitting it. After submission, your score will be final. 




Logic Warm-Up

Pattern Recognition Warm-Up


IP Addresses

Let's Learn about IP Addresses

What is an IP address?


The Internet Protocol (IP) is a set of rules for communication over the internet. An IP address identifies a network or device on the internet. The Network ID indicates which network the device is on. The Host ID refers to the specific device on that network. An IP address is represented by a series of four decimal numbers that are separated by a period or dots. Another term for this arrangement is the dotted-decimal format.


Here is an example of an IP Address: 192.168.101.2 


IP addresses are composed of two parts:


  1. a network ID portion comprising the first three numbers of the address and 
  2. a host ID which is the fourth number in the address. 
For example, if your home network’s IP address is 192.168.1.1, 192.168.1 is the network ID, and the final number, 1, is the host ID.

Internet protocols manage the process of assigning each unique device its own IP address.

There are two types of IP addresses: IPv4 and IPv6


It’s easy to recognize the difference if you count the numbers.

IPv4 addresses contain a series of four numbers, ranging from 0 (except the first one) to 255, each separated from the next by a period — such as 5.62.42.77.

IPv6 addresses are represented as eight groups of four hexadecimal digits, with the groups separated by colons. A typical IPv6 address might look like this: 2620:0aba:0d01:2042:0100:8c4d:d370:72b4.


IP Address Questions



Instructions for the Assessment

This assessment includes exercises that teach the fundamentals of Python as well as multiple-choice questions. As you work through the assessment, please use the online IDE (Integrated Development Environment) linked below to try out and test the code. An IDE, or code editor, is a bit of software that helps programmers develop software efficiently. It does so by combining capabilities such as editing, building, testing, and packaging software code into an easy-to-use application.


To get familiar with the IDE, visit this link: https://www.online-python.com/wBtfxedhJC.


Click the run button and follow the prompts in the terminal in the bottom section of the IDE. If everything works correctly, you will see a greeting with your name printed on the terminal.


To try out code as you move through the assessment, type in or copy and paste code into the main.py file in the IDE, then click the run button.

Before you move on!

No previous programming knowledge is required to complete this assessment. While not all tracks will use Python, this assessment style provides an ideal asynchronous educational experience for our team to assess your qualifications for the program. 
This assessment will ask you to review content, think logically, and apply new knowledge to answer questions. The questions and content will gradually increase in difficulty, and we encourage you to always double-check your answers with the IDE whenever possible.

Some TIPS before getting started! 

As you write code and try out exercises, keep in mind that computers are machines that do not think! The code you write will be executed exactly as it is typed. Therefore, look very closely at the examples and any code you write. The code must be written exactly for the computer to follow your instructions.



As you progress through the assessment, you may encounter errors in the IDE terminal, which will appear in red.


In the example below, attempting to reference “hello” which has not been previously defined, will throw an error.




Let's Learn About Python

What is Python? It is an interpreted, object-oriented programming language.


Now, what does that actually mean? 

Interpreted vs Compiled


An interpreted language differs from a compiled language.


Computers only understand machine code, which is not readable by humans. To aid human programmers, higher-level human-readable programming languages are either compiled or interpreted languages. In compiled languages such as C++, the elements that make up the coding language are compiled (translated if you will) in their entirety into machine code, which is then read and executed by the computer from start to finish in one shot. In an interpreted language such as Python, there is an intermediary step between the human-readable code and its translation into machine code. Unlike compiled code, interpreted code is translated and run one line of code at a time. Because of this, interpreted code can be changed as the program is running, whereas, with compiled languages, the code must be recompiled and re-ran in its entirety for any changes to be reflected.


Consider how this would look if you shared a recipe with a friend. If the recipe was in an interpreted language, you could change the dish on the fly, and your friend could translate that change in real-time. In a compiled language, you would need to send the entire recipe back to be translated again for any change you wish to make.

Object Oriented Programming and Procedural Programming

Object Oriented Programming and Procedural Programming are the two main paradigms in programming.


Object Oriented Programming is the most popular. It relies on classes and objects. A class is an abstract blueprint that creates more specific things called objects. Classes can also have functions called methods, which are available to each of the objects it creates. Consider an automobile factory. The factory has all of the machinery and blueprints to create a certain type of car. Each car can possess different attributes such as color, accessories, or trim. In this example, the factory represents a class and each car that comes from the factory represents an object.


In Procedural Programming a step-by-step approach is used. While an Object Oriented approach aims to model a real-world environment via classes and objects, a Procedural approach breaks a task down into routines or subroutines. If a blueprint for a house represents an Object Oriented approach, an ordered list of steps to build a house from start to finish represents a Procedural approach. 

Python Exercise and Question

Now take some time to practice running Python Code

Click this link: https://www.online-python.com/JzGIP8ZaMu

Then, follow the directions for the exercise on the next slide. 

EXERCISE!

The purpose of this exercise: To become more familiar with running a simple program and seeing the results printed on the screen.


In the main.py file in the IDE, type the code in the image below.



print("Hello TKH!")


Then click the “run” button. This will call a function print(). A function is a bit of code with a name that performs a specific task. After clicking the run button, you should see the output in the terminal at the bottom of your screen. Output is the term used to describe something printed on your screen via the terminal.

Python: Data Types
An Object-Oriented language like Python is built around modeling the real world using computational structures. We have two essential concepts in this language: basic data values & variables. The data are like the raw materials used to construct a house - cement, wood, and hardware. These individual pieces of data are often used together with variables. Variables are like containers that hold values. In our analogy, the variables would be like toolboxes, wheelbarrows, and buckets that enable you to transport and store the raw materials for use. Let’s explore a few of the built-in primitive data types in Python.

Strings

Strings are used to represent words or letters. They are defined with single or double quotes. Two examples of strings in the image:


The image on this slide is of written Python code that reads:  "This is a string"  'This is also a string!'  another_one = 'This string is in a variable'

Python String Data Type Exercise and Question

EXERCISE!

The purpose of this exercise: To become more familiar with the String data type.


In the code editor, try using the print() method to output a string of your name to the terminal.


Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.

There are two right answers please choose one of them.

Python Questions Continued

Let's Learn About Numbers, and Integers
Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.
Numbers

There are two types of numbers used in Python. Integers represent whole numbers, and Floats represent decimal numbers.

Numbers can be used to represent an object's attributes and perform mathematical operations.


The example below shows several mathematical operations being evaluated and printed to the screen using python’s built-in print function.


print(15 / 12) # 1.25  print(44 + 13) # 57  print(4.2 * 8) # 33.6  print(16.76 - 4.32) # 12.440000000000001


Numbers and Integers Exercise and Question
EXERCISE!

The purpose of this exercise: To practice doing simple math using the Integer and Float data types.


In the code editor, try using print() to output the results of some addition (+), subtraction (-), division (/), and multiplication (*).



Reminder!


Anytime you are asked about code in any of the questions, always double-check your answer using the IDE to ensure you are comfortable with your answer choice. 


Let's Learn About Lists!
A list in Python is similar to a numbered to-do list in the real world. A list can store any type of data which can then be accessed in the order it appears in the list. A list is created using square brackets [ ] surrounding any data separated by commas: 

[1, 2, 3, 4, 5]  ['a', 'b', 'c', 'd']  ['a', 1, 2, 'c', 'hello', 5]

To access an element in a list, we use an index. An index is a place an element is within a list. Lists start with an index of 0 and increase by 1 from left to right along the list. This means that the first element in a list has an index of 0.


In the screenshot, ‘a’ and ‘hello’ are being accessed.


The image on this slide is of written Python code that reads:  list_one = ['a', 1, 2, 'c', 'hello', 5]  print(list_one[0]) # 'a'  print(list_one[4]) # 'hello'

Lists Question

LISTS: Functions & Methods

There are a variety of other functions which can be used to operate on lists:


To find the length of a list we can use len()


print(len(['a', 1, 2, 'c', 'hello', 5])) # 6

To sort a list when the data type of each element is the same we can use sorted()

print(sorted([5, 3, 2, 1, 4])) # [1, 2, 3, 4, 5]
To remove the last element of a list we can use .pop()

List One
LISTS: Functions & Methods Exercise and Question

EXERCISE!

The purpose of this exercise: To practice operating on lists using a few built-in functions.


Try out some variations of the operations in the image to the right (accessing elements by index, printing the length, sorting, and removing the last element) on lists in the code editor.

__


The image on this slide is of written Python code that reads:


list_one = [5, 3, 2, 1, 4]


# print a sorted list_one


# print the third element of list_one


# print the length of list_one


# remove the last element of list_one, then print the shortened list_one


The image on this slide is of written Python code that reads: list_one = [5, 3, 2, 1, 4]  # print a sorted list_one  # print the third element of list_one  # print the length of list_one  # remove the last element of list_one, then print the shortened list_one

Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.

Let's learn about Dictionaries!
Unlike lists, dictionaries are not in a specific order. Dictionaries consist of key/value pairs where a key point to a specific value, much like a word in a real-world dictionary is paired to a specific definition. To create a dictionary, keys are written in string format within curly brackets { }. Key/value pairs are separated by commas. In the first example in the screenshot below, ‘hello’ is the key, and ‘1’ is the value.

{'hello': 1, 'world': 2}  {'key1': 'hello', 'key2': 'world'}
If no key is found for the value passed into the square brackets an error will be shown. To avoid this you can use the .get() method:


The image on this slide is of written Python code that reads:  dictionary = {'hello': 1, 'world': 2}  print(dictionary.get("hello"))  # 1  print(dictionary.get("hi"))  # none

Dictionaries Question

Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.

Let's learn about Booleans!
The Boolean data type can have only two values: True or False. In Python, the individual values of data can either evaluate to True or False. Values that evaluate to True are considered “Truthy” while values that evaluate to False are considered “Falsy”.

The following will evaluate to False:

The image on this slide is of written Python code that reads:  [] - empty lists  {} - empty dictionaries  "" - empty strings  0 - a value of zero for an Integer  0.0 - a value of zero for a Float  False - the constant False
The following evaluate to True:


The image on this slide is of written Python code that reads:  ['a', 'b', 'c'] - non empty lists  {"name": "Henry", age: 23} - non empty dictionaries  "hello world" - non empty strings  10 - Integers that are not zero  2.2 - Floats that are not zero  True - the constant True

Booleans Exercise

EXERCISE!

The purpose of this exercise: To practice evaluating the Truthiness of data using the bool() function.


Using the code editor, experiment with a few examples of using the bool() function to determine if data is truthy or falsy.

Let's learn about Variables!

You have now learned about a few types of data in Python.


How can we use this data?

A common approach is to store data in variables to be used later within a program. A program is a set of instructions that a computer uses to perform a specific set of tasks. Variables are like containers that hold values.


first_name = "Tashawn" last_name = "Jones"

Storing two strings as variables allows us to use them elsewhere. A common operation performed on two strings is concatenation. To concatenate means to link together in a series or chain. For example, you can concatenate the two strings in the previous image in a print() function:


Note that in the example a special character “f” is used within the print() function before the string is printed to the terminal. Placing the “f” before a string allows us to use a Python expression within the string. In programming, an expression is a value or anything that executes and ends up being a value. 


print(f"{first_name} {last_name}")  # Tashawn Jones

In the image in the previous slide, first_name and last_name are both variables that hold a value. Their values will be placed within the string.


The process of calculating the result of an expression and inserting it into a string is called string interpolation. In Python, an expression is a collection of values and operators that result in a new value when you run the code. Variables can be used to store many types of data, which can then be operated on.


The image on this slide is of written Python code that reads:  my_list = ['a', 'b', 'c', 'c']  my_list[0]  # 'a'  dictionary = {'key1': 'value1', 'key2': 'value2'}  dictionary.get("key2")  # 'value2'  one = 1  three = 3  print(one + three)  # 4  print(one - three)  # -2

Variables Exercise and Question

EXERCISE!

The purpose of this exercise: To gain a better understanding of the primitive data types covered thus far.


Use the code editor to define a variable that stores each of the data types you have learned about thus far.

Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.

Let's learn about Control Flow!
When modeling a real-world environment it will often be the case that you require a program to execute differently based on multiple possibilities within a scenario. Imagine the real-life scenario when you are deciding what to wear when going for a walk. If the weather is nice you could wear a t-shirt. If it is raining that day you could wear a rain jacket and bring an umbrella.

In Python, we can achieve control flow using conditional statements like if/else and looping constructs like for and while. Within conditional statements and loops, it is often necessary to compare 2 or more things in order to determine which part of a program to execute next. We can accomplish this using comparison and/or logical operators.


The next two images show examples of comparison operators and logical operators.

Comparison Operators

The image on this slide shows an example of a comparison operator.

The image on this slide is of written Python code that reads:  == equal to  != not equal to  < less than  > greater than  <= less than or equal to  >= greater than or equal to

Logical Operators

The image on this slide shows an example of a comparison operator.

and  or  not

if/else Statements

Comparison and Logical Operators can be used within an if/else statement to determine which line of code should run. When a conditional statement evaluates to True, the line below the condition will execute. When a conditional statement evaluates to False the line below the condition will be skipped.


Elif is short for "else if" and is used in Python when a first condition is not met, but then you want to test another condition.


The top image on this slide is of written Python code that reads: name = "Anna"   if name == "Anna":  print("Hello, Anna!") else:  print(f"Goodbye, {name}")

age = 21  if age >= 16:   print("Here is your driver's license") elif age == 15:   print("Here is your learner's permit") else:    print("You are too young to drive")

Conditions, Comparison and Logical Operator Combos

Comparison Operators can be used within conditions as well as Logical Operators, and they can be combined.


The top image on this slide is of written Python code that reads:  team = {  "sport": "basketball",  "name": "L.A. Lakers",  "rank": 1  }    if team.get("name") == "L.A. Lakers" and team.get("rank") < 2:  print(f'{team.get("name")} {team.get("sport")} rank: {team.get("rank")}')  else:  print("This team is not number one")

Control Flow Exercise and Question

EXERCISE!

The purpose of this exercise: To become more familiar with using conditional logic in order to control the flow of a program’s execution.


Using the variable name = “Steve”, write a condition using an if/else statement to print “Hello, Steve” to the terminal when True and print Goodbye to whatever the value of the name variable is when it is not equal to “Steve”.

Reminder!

Anytime you are asked about code in any of the questions always double-check your answer using the IDE to ensure you are comfortable with your answer choice.

Let's learn about LOOPS

A loop allows you to run the same code repeatedly. Since a loop will continue forever, it is common to use a condition to determine when a loop will stop executing. Let’s use the basic while loop to countdown the next NASA launch.


Notice after each print() statement within the loop we use the “subtract and assign” (-=) operator to decrement the value of i by one. This ensures that our condition will eventually evaluate to false and stop the loop from executing. 


The image on this slide is of written Python code that reads:  i = 10  print("Launch in...") while i > 0:   print(f"{i}")  i -= 1  print("Lift off!")  # Launch in... # 10 # 9 # 8 # 7 # 6 # 5 # 4 # 3 # 2 # 1 # Lift off!

Loops Question