Coding Notes
Coding Notes
SYSTEM THINKING - parts of a system are analysed individually to see how they influence
the functioning of the whole system
Data processing - involves acquiring data from various sources, storing it in a suitable format
and then performing various operations to extract information from the data
Figma is a powerful design tool that helps you to create anything: websites, applications,
logos etc.
Pandas is a tool used for working with data sets; analysing and manipulating data
3 ways to problem-solve:
Algorithmic design - defining the problem, identifying the inputs and outputs, and then
creating a step-by-step procedure to solve the problem
Problem solving - involves identifying a problem, defining its requirements, and then finding
a solution. This may involve using algorithms and data processing techniques, as well as
creativity and critical thinking.
Data frames: is a data structure that organises data into a 2-dimensional table of rows and
columns.
Coding notes for finals
1. Slicing is a technique which is used to create small sets of your large data. Using
loc
2. Sorting is a technique that display data in an ascending or descending order
(data.sort_values), ascending = true/false
3. Grouping data by columns is used when you have duplicated data in a particular
column (data.groupby)
Pandas loc function is used to slice data based on index and columns. It is powerful tool
for data analytics
Pandas iloc - functions similar to loc to slice rows and columns, it uses index for columns
instead of column names
Data analysis - process of collecting, cleaning, sorting and processing raw data to extract
relevant information
- Python is used because it is easy to learn and has simple syntax. It has a big
collection of libraries for data manipulation
Python libraries:
1. Pandas - working with data sets; analysing and manipulating data
2. NumPy - working with maths operations on arrays
3. Seaborn - drawing statistical graphs
4. Matplotlib - plotting 2D graphs and other visuals
What is HTML?
- HTML is hypertext markup language
- A markup language is a set of markup tags
- The tags describe document content
- HTML documents contain HTML tags and plain text
- HTML documents are also called web pages
HTML Tags
- HTML tags are keywords (tag names) surrounded by ANGLE BRACKETS like <Html
tags>
- HTML tags normally come in pairs like <p> and </p>
- The first tag in a pair is the Start Tag, the second tag is the End Tag
- The end tag is written like the start tag, with a Slash before the tag name
- Start and End tags are also called Opening Tags and Closing Tags
Example: <tagname>content</tagname>
HTML Tables
- Tables are defined with <table>
- Table rows are <tr>
- Table data are <td>
- Table heading are <th>
HTML List
- HTML can have unordered lists & ordered lists
Unordered HTML List - the list items are marked with bullets
- The first item
- The second item
- The third item
Ordered HTML List - the list items are marked with numbers or letters
1. The first item
2. The second item
3. The third item
Coding notes for finals
HTML Forms
- Used to select different kinds of user input
- Used to pass data to a server
- Most import element is the <input>
- The <input> element is used to select user information
- An <input> element can be of type text field, checkbox, password, radio button,
submit button, and more.
Radio buttons let a user select only one of a limited number of choices.
<input type="radio“>
Checkboxes let a user select zero or more options of a limited number of choices.
<input type="checkbox“>
Reset allows the user to clear all the input from form
<input type="reset“>
Css
- stands for cascading style sheets
- Styles define how to display html elements
Css selectors are used to "find" (or select) html elements based on their id, classes, types,
attributes, values of attributes and much more
● element selector - selects elements based on the element name.
● id selector - selects elements based on the id attribute of an html tag
● class selector - finds elements with a specific class
All html elements can be considered as boxes. In css, the term "box model" is used when
talking about design and layout.
Coding notes for finals
Content - The content of the box, where text and images appear
Padding - Clears an area around the content. The padding is transparent
Border - A border that goes around the padding and content
Margin - Clears an area outside the border. The margin is transparent
JAVA Script
How do you create a function in JavaScript?
- A JavaScript function is defined with the function keyword, followed by a name,
followed by parentheses ().
3. Define a data frame and explain how to select a subset of data in a Pandas
dataframe
Coding notes for finals
Data frame is a data structure that organises data into a 2-dimensional table of rows
and columns.
You can select a subset of data by using the loc() function. It works on the basis on
labels ie. we need to provide the row or column to choose
Pandas.dataframe.loc()
block.loc([0,1,3])
5. What is the syntax to slice a portion of data from a Pandas data Frame in
Python, and how does it work?
Using the loc () function.
Dataframe.loc[starting_row:ending_row;starting_column:ending_
column]
You have the first row and last row separated by the colon. The comma separates
the rows and columns. Then you have the first column and last column.
7. Define what a scatter plot is and provide an example of using Python code
Scatter plot is a diagram where the data value is represented by a dot.
Matplotlib is used for plotting 2D graphs and other visuals. It can draw scatter plots
using 2 arrays (x axis, y axis).
The <a> tag indicates where the hyperlink starts and the </a> tag indicates where it
ends. Whatever text gets added inside these tags, will work as a hyperlink.
14. Consider the following Python code. What will be the output?
import matplotlib.pyplot as plt
x = [1, 2, 3, 4, 5]
y = [2, 4, 6, 8, 10]
plt.scatter(x, y)
plt.show()
You will get a scatter chart