In simple terms, a function or function is program code designed to complete a specific task and is part of the main program. When adapted into Indonesian, this function is also called a function.
Based on who made, the functions can be divided into 2 groups:
Sample code :
In this section, we will discuss Python programming code commands for branching program code, also known as condition / logical structure. In Python, there are If, If Else, and If Else If (elif) conditions.
In programming, there are times when we need a branch, that is if a condition is met, run this program code, if not, run another program code.
Example of a simple if branching code :
Python Programming Language Operators
The following are the types of operators in the Python programming language :
Arithmetic operators are operators that we usually find for mathematical operations. Arithmetic itself is a branch of mathematics that discusses simple calculations, such as times, dividing, adding, and subtracting.
Python data types
In Python, there are 3 ways to create a string data type :
Writing regular code uses the string data type
Python is a very minimalist programming language
Examples of Hello World code like this are:
Python uses the new line character as a command separator, technically speaking. This newline character is a line break marker created by pressing the Enter key.
print("Hello World")print("Learning Python")print("Don't give up!!")
If each different command line is enough, there is no need to close (;). But if we mark (;) Python will not protest. If we want to write several commands in one line, then writing the closing (;) is required.
print("Hello World"); print("Learning Python");print("Don't give up!!");
But writing like…
Python is a programming language that has multipurpose functions. In python, unlike other difficult programming languages, python has a language that is easier to read and understand. Python puts more emphasis on the readability of code which is easier to understand syntax.
Why choose the python language? because python language is simple, neat, and short. Python is also a very powerful language with many applications in the scientific field. The use of python also makes applications such as big data, data mining, deep learning, data science to machine learning.
This language first appeared in 1991, designed by a man named…