Professional Documents
Culture Documents
1. VARIABLE
It's a storage container for data values. It is generated when you assign a value
to it for the first time. When you create a variable with the same name inside a function,
2. PRINTING FUNCTION
The print() function sends a message to the screen or another device, or gadget
with standard output. The message can be a string or any other object, which will be
3. FUNCTION
Functions aid in the division of our program into smaller, modular chunks. As our program
4. LOOP FUNCTION
until the specified condition is satisfied. Looping is the process of repeating something
PilipinWHO? | 1
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
5. IF STATEMENT
It is the core of the decision-making statement. It tells the program to only run a
block of code if a specific condition is met. If statements are control flow statements that
allow us to run code only when a certain condition is met. If you want to print a message
on the screen only when a condition is true, you can use the if statement in
programming to do so.
6. IF-ELSE STATEMENT
In the Python language, the keywords if and else are used to execute one block
of statements among two blocks. If is used when the condition is true, while otherwise is
PilipinWHO? | 2
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
7. ELIF STATEMENT
Elif is a short form of "else if," and it allows us to explore many expressions at
once. If the if condition is incorrect, the condition of the next elif block is checked, and
so on. If any of the conditions are incorrect, the content of the else is executed.
8. ARITHMETIC OPERATOR
operations. Some languages have arithmetic operators that other languages do not. For
example, in division operations, the modulus operator returns the remaining value.
PilipinWHO? | 3
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
9. COMPARISON OPERATOR
It's used to compare data. Equal, not equal, greater than, less than, greater than
or equal to, and less than or equal to are some of the options.
F. SOURCE CODE
PilipinWHO? | 4
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 5
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 6
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 7
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 8
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 9
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 10
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 11
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 12
Republic of the Philippines
BATANGAS STATE UNIVERSITY
BatStateUAlangilan
Alangilan, Batangas City
College of Engineering, Architecture and Fine Arts
https://batstate-u.edu.ph/, Tel. No. (043) 425-0139 loc. 118/2121
PilipinWHO? | 13