Python Learning Guide
Python Learning Guide
2. PRESENTATION
Dear trainees, on behalf of the National Learning Service SENA, we welcome you.
to the virtual supplementary training program Variables and control structures in Python.
In this complementary course, Python has been selected, a free software with a simple language.
easy to learn and powerful in its coding for developing web or mobile applications, games,
scientific graphics and algorithms of advanced calculation, moreover, it works on any operating system
that integrates its interpreter, being a useful tool for the Machine Learning area.
For the development of the proposed learning evidence in this guide, reading is necessary.
detailed and critical of the formative components of the program and based on the implementation of the workshops
Formulated, you will take ownership of the knowledge presented.
GFPI-F-135 V01
3. FORMULATION OF LEARNING ACTIVITIES
Through the active didactic strategy of individual learning, you will be able to learn the fundamentals of
programming language Python, related to the use of constants and variables, input and
data output, assignment instructions, operators and predefined functions, use of counters
accumulators, conditional statements and repetitive cycles.
3.1 Learning Activity 1. Define variables in Python according to the data type.
Duration: 6 hours
Before starting with the development of learning activities and critical reading of the
training components, we invite you to participate in the social forum, this forum is a meeting space
between learners and instructor, where expectations, life projects, and tastes can be shared
personal. With participation in it, the goal is to create a social network of virtual companions.
For this reason, I made a personal presentation including: work experience, knowledge.
previous and aspects that I believe will help you in this training program in some context
of his life.
Once the formative component one: Terms associated with the type of data has been reviewed, develop the
following evidence of learning, during the first week:
As the first evidence to present in this learning activity, participate in the thematic forum.
denomination of Python, responding to the question: From your role and analyzing the
business and social issues, propose a possible software that you would like to code with
Python to solve a certain situation? In addition to demonstrating mastery of the topic, it must
provide feedback to at least two of your peers, demonstrating knowledge construction
in response to the proposals that each one puts forward.
It is important that, to participate in this forum, you read carefully the training component one, in
the Introduction section, analyze the current uses of the Python language and watch the video 'The
most important uses of Python" at the following link:Invalid URL
ZNxbq3DNE0
GFPI-F-135 V01
⮚ Evaluation. Data types in Python.
As a second piece of evidence to develop, I conducted the online assessment consisting of questions on
multiple choice with a single answer and True/False questions about the terms
associated with the type of data, according to what was presented in training component one.
3.2 Learning Activity 2. Code input and output data instructions following
standards in Python.
Duration: 18 hours
Once the formative component two: Input and Output of Data with Python has been reviewed, develop
the following learning evidences:
As the first evidence to present in this activity, I participated in the thematic forum called
integrated functions of Python, answering the question What are integrated functions
Does Python language provide for strings, numbers, or sequences? In addition to demonstrating handling.
The topic must provide feedback to at least two of their classmates, demonstrating construction.
of knowledge regarding the proposals that each one puts forward.
It is important that, to participate in this forum, you carefully read the training component 2, in the
numeral 3.5 Predefined functions of Python, analyze the uses of those functions and visit the
pagenaThe provided content is a URL, not text to translate.in the link 5.6. Functions
integrated.
a. Download the installer for the Python interpreter from the official pagewww.python.org
b. Run the installer by clicking next... next...
c. Type: 'IDLE' in your computer's taskbar to activate the Python editor.
GFPI-F-135 V01
d. Open a new file using the options File - New File or the keys: CTRL+N
e. Type the following code in Python language:
f. Save the entered program using the File - Save option or the CTRL+S keys.
g. Run the program with the option: Run - Run Module or the F5 key
h. Check the results. Modify the code to your personal taste and repeat the last 3.
steps.
i. Open a new Word document with your personal information and the title: AA2-EV2 WORKSHOP 1
j. Take the final code created with the Python language.
Take a screenshot of the program results and paste it into your Word document.
Save the Word document with the name: AA2-EV2 Workshop 1
GFPI-F-135 V01
⮚ Workshop 2: sequential instructions.
a. Type: 'IDLE' in the taskbar of your computer to activate the Python editor.
b. Open a new file using the options File - New File or the keys: CTRL+N
c. Type the following code in the Python language:
d. Save the typed program using the File – Save option or the CTRL+S keys.
e. Run the program with the option: Run – Run Module or the F5 key
f. Check the results. Modify the code to your personal preferences and repeat the last 3.
steps.
g. Open a new Word document with your personal data and the title: AA2-EV3 WORKSHOP 2
h. Take the final code made with the Python language.
i. Take a screenshot of the program results and paste it into your Word document.
j. Save the Word document with the name: AA2-EV3 Workshop 2
GFPI-F-135 V01
Guidelines for the submission of evidence:
As the final evidence to be developed in learning activity 2, I conducted the online assessment.
composed of relationships between columns and multiple choice questions with a single answer
about operators and functions in Python, according to what is presented in the component
training dos.
12 hours
Once the training component three: Conditional control structures has been reviewed, develop the
following evidence of learning:
a. Type: 'IDLE' in the taskbar of your computer to activate the Python editor.
b. Open a new file using the File - New File options or the keys: CTRL+N
c. Type the following Python language code:
GFPI-F-135 V01
d. Save the typed program using the File - Save option or the CTRL+S keys.
e. Run the program with the option: Run - Run Module or the F5 key
f. Check the results. Modify the code to your personal preferences and repeat the last 3.
steps.
g. Open a new Word document with your personal information and the title: AA3-EV1 WORKSHOP 3
Take the final code written in Python.
i. Take a screenshot of the program results and paste it into your Word document.
j. Save the Word document with the name: AA3-EV1 Workshop 3
GFPI-F-135 V01
⮚ Workshop 4: nested conditionals.
For the second evidence of this learning activity 3, code in Python language.
Workshop 4: Nested conditionals. Do the following:
a. Type: "IDLE" in the taskbar of your computer to activate the Python editor.
b. Open a new file using the options File - New File or the keys: CTRL+N
c. Type the following sentences:
d. Save the typed program using the File – Save option or the CTRL+S keys.
e. Run the program with the option: Run – Run Module or the F5 key
f. Check the results. Modify the code to your personal taste and repeat the last 3.
steps.
g. Open a new Word document with your personal data and the title: AA3-EV2 WORKSHOP 4.
Take the final code made with the Python language.
i. Take a screenshot of the program results and paste it into your Word document.
Store the Word document with the name: AA3-EV2 Workshop 4.
GFPI-F-135 V01
3.4 Learning Activity 4. Use iterative control structures in Python considering the
customer requirements
Duration: 12 hours
Once the training component 4: Iterative Cycles with Python has been reviewed, develop the following
learning evidence:
Type: 'IDLE' in the taskbar of your computer to activate the Python editor.
b. Open a new file using the options File - New File or the keys: CTRL+N
c. Type the following Python code:
d. Save the entered program using the File – Save option or the CTRL+S keys.
e. Run the program with the option: Run – Run Module or the F5 key
f. Check the results. Modify the code to your personal tastes and repeat the last 3.
steps.
g. Open a new Word document with your personal data and the title: AA4-EV1 WORKSHOP 5.
h. Take the final code crafted with the Python language.
i. Take a screenshot of the program results and paste it into your Word document.
j. Save the Word document with the name: AA4-EV1 Workshop 5
GFPI-F-135 V01
Guidelines for submitting the evidence:
For the second evidence of this learning activity 4, code in Python language.
Workshop 6: WHILE loop. Do the following:
a. Type: 'IDLE' in the taskbar of your computer to activate the Python editor.
b. Open a new file using the options File - New File or the keys: CTRL+N
c. Enter the following code:
GFPI-F-135 V01
d. Save the entered program using the File – Save option or the CTRL+S keys.
e. Run the program with the option: Run - Run Module or the F5 key
f. Check the results. Modify the code to your personal preferences and repeat the last 3.
steps.
g. Open a new Word document with your personal information and the title: AA4-EV2 WORKSHOP 6.
h. Take the final code made with the Python language.
i. Take a screenshot of the program results and paste it into your Word document.
j. Save the Word document with the name: AA4-EV2 Workshop 6.
4. EVALUATION ACTIVITIES
Evidence of Knowledge:
AA2-EV04. Evaluation. Types Questionnaire
of operators in Python.
GFPI-F-135 V01
Product Evidence: Use control structures
AA3-EV01. Workshop 3: conditionally applying the Checklist
simple conditionals. statements and operators
Python conditionals.
Product Evidence:
AA3-EV02. Workshop 4: Checklist
nested conditionals.
5. GLOSSARY OF TERMS
Source Code: it is a set of instructions and logical orders, composed of algorithms that
found written in a certain programming language, which must be interpreted or
compiled, to allow the execution of a computer program.
Expression: a syntactic construction that can be evaluated, until giving a value. In other words,
an expression is an accumulation of elements of expression such as literals, names, accesses
to attributes, operators, or function calls, all of them returning a value. Unlike others
Languages, not all the syntax of the language are expressions.
Function: a series of statements that return a value to the caller. You can also pass to it
zero or more arguments which can be used in its execution.
IDLE: it is the integrated development environment for Python, or Integrated Development Environment for
Python. IDLE is a basic editor and interpreter environment that comes with the standard distribution.
of Python.
Indentation: this term means moving a block of text to the right by inserting spaces or
tabulators, to separate it from the left margin and distinguish it from the adjacent text; in the field of
In printing, this concept is called bleed.
Immutable: an object with a fixed value. Immutable objects are numbers, strings, and tuples.
objects cannot be altered. A new object must be created if a different value is to be set.
saved.
Interpreter: reads a program written in a high-level language, instruction by instruction, and for each
one of them translates the instructions into equivalent machine code and executes them
immediately. Every time we run the program with an interpreter, the process is repeated
translation and execution, since both are simultaneous.
GFPI-F-135 V01
Multiparadigm: accepts different paradigms (techniques) of programming, such as object-oriented
to objects, imperative and functional programming.
Free software: it is the software that respects the freedom of users and the community, It means that the
users have the freedom to run, copy, distribute, study, modify, and improve the software.
Dynamic typing: a dynamically typed language is one whose variables do not need to be defined.
assigning its data type, but it self-assigns at runtime, according to the value
declared.
The Zen of Python: it is a list of the basic principles of the Python language, they are useful to understand and
use the language. The list can be found by typing 'import this' in the interactive console.
6. BIBLIOGRAPHIC REFERENTS
Cervantes, O. (2017). Python with applications to mathematics, engineering, and finance. Mexico.
Alfaomega.
Guzdial, B. and Vidal, A. (2013). Introduction to Computing and Programming with Python. Mexico:
Pearson Education.
Marzal, A. and Gracia, I. (2009). Introduction to Programming with Python. Jaume I University.
Easy Python
GFPI-F-135 V01
7. DOCUMENT CONTROL
8. CHANGE CONTROL
GFPI-F-135 V01