Category Archives: Python Tutorial

Python User Defined and Built-in Functions – Defining and Using Functions

‘Python User Defined and Built-in Functions – Defining and Using Functions’ is our Python tutorial to explain the use of Python functions in Python programs / scripts. We will cover the following topics on Python Functions: Python Functions Defining and Using Functions What is a Function? Importance of Functions Advantages of  Using Functions Types of… Read More »

Python Variable Names and Naming Rules

Python Variable Names and Naming Rules is a Python tutorial to explain the rules and importance of choosng good names for your variables in a program. Choose Short but Meaningful Variable Names Python Variable names shoud be short but meaningful. It will add in program readability. For example, ‘num’ is a better variable name than… Read More »

Python if elif else Statement

Python if elif else Statement decides to select only one block of statements from many given block of statements. It selects a block on the basis of the condition related to that block. It means that if elif else statement has many conditions and corresponding blocks of statements. If a given condition is true, if… Read More »

Python if else statement

Python if else statement is another form of Python if statement. It executes one block of statements, if the given condition is true and the other when it is false. So there are two blocks in if else statement – if-block and else-block. Syntax of Python if else Statement if condition: if-block else: else-block Where… Read More »

Write and Run Sample Python Script

How to Write and Run Sample Python Script: In this tutorial we will write a sample Python script To Input name of the user and display a Welcome message to the user. We will suppose that you have already installed Python 3.7 on your computer system. If you have not installed the Python 3.7, please… Read More »