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 :

Output


Definition of the If Condition of the Python Language

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 :

Result


Python Programming Language Operators

The following are the types of operators in the Python programming language :

Arithmetic

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

There are 9 types of python data types :

How to Create a Python String Data Type

In Python, there are 3 ways to create a string data type :

Writing regular code uses the string data type

Output :


Python Program Code Structure

Python is a very minimalist programming language
Examples of Hello World code like this are:

print("Hello World")

Statement Terminator

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

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…

erizky ningtya

i am good girl

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store