Rivera - Homework 1 - SP - U2
Rivera - Homework 1 - SP - U2
Structural Programming
Puerto Adrián
Robotics 2ºC
Homework1–U2
Instructions: Review the reference 1and complete all is requested in each point.
For each of the exercises it is necessary to generate evidence taken directly from
your computer.
Deadline: 09/06/24.
1
June 9th, 2024
b. 3-2
2
June 9th, 2024
c. 3-2
3
June 9th, 2024
d. 3-4
4
June 9th, 2024
e. 3-5
5
June 9th, 2024
Is a logical design that controls the order in which a set of statements execute.
e. What types of relationships between values can you test with relational
operators?
6
June 9th, 2024
else:
s1 = 'New York'
s2 = 'Boston'
if s1 > s2:
print(s2)
print(s1)
else:
print(s1)
print(s2)
Boston
New York
7
June 4th, 2024
Classroom Task
Program 2-14
June 4th, 2024
Program 2-15
June 4th, 2024
Program 2-16
June 4th, 2024
Program 2-17
June 4th, 2024
Program 2-18
Program 2-19
June 4th, 2024
Program 2-20
Program 2-21
June 4th, 2024
Program 2-22
June 4th, 2024
Program 2-23
June 4th, 2024
Classroom Task
• Python Variables
A Python variable name must start with a letter or the underscore character.
A Python variable name cannot start with a number. A Python variable name can
only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ).
Variable in Python names are case-sensitive (name, Name, and NAME are three
different variables). The reserved words(keywords) in Python cannot be used to
name the variable in Python.
Rules of global keyword
Numeric
Python provides three distinct numeric data types to handle various types of
numeric values:
Sequence Type
Boolean
Boolean data type represents one of two built-in values: True or False.
Set
Dictionary
Binary Types
They include memoryview, bytearray, bytes.
June 4th, 2024
• Libraries in Python
Python libraries consist of codes or modules that can be integrated into a program
for specific operations. In a Windows environment, these libraries often have a DLL
extension (Dynamic Load Libraries). When a program runs, the linker searches for
the linked library, extracts its functionalities, and incorporates them into the program.
Pandas: Crucial for data scientists, Pandas is an open-source library that offers
flexible data structures and analysis tools. It simplifies data analysis,
manipulation, and cleaning with support for operations like sorting, re-indexing,
iteration, concatenation, and aggregation.
Scrapy: An open-source library for web crawling and data extraction, Scrapy
excels in data mining and automated testing.
PyGame: This library provides an interface for developing video games using the
SDL (Standard Directmedia Library) platform-independent graphics, audio, and
input libraries.
On cmd, we check our Python version, and if the program recognizes “pip”. To install
it, we write curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py.