Posts

Showing posts from 2025

Featured Post

How To Use Python Input Function

Image
 How To Use Python Input Function Introduction  This Python Beginner tutorial will guide you on the usage of input() function in python. We use input function in all our Python Projects, so, it's necessary to understand,  what is input function, how it is used and why it is used in python projects.  What is input() function  Python input() function is a function that accepts input values from a user when prompted to provide an input. It is an inbuilt function that reads the input values from the user and after evaluating it, by default, the input() function will return the input as a string. The input function doesn't have parameters inside its parenthesis, but, it takes a prompt in the form of a string inside it's parenthesis. For example: Consider a variable that you created , name, and you want to get input of different name values from the user, so you use the input function with a prompt inside it's parenthesis as shown below: CODE name = input(...

How To Use Python Input Function

Image
 How To Use Python Input Function Introduction  This Python Beginner tutorial will guide you on the usage of input() function in python. We use input function in all our Python Projects, so, it's necessary to understand,  what is input function, how it is used and why it is used in python projects.  What is input() function  Python input() function is a function that accepts input values from a user when prompted to provide an input. It is an inbuilt function that reads the input values from the user and after evaluating it, by default, the input() function will return the input as a string. The input function doesn't have parameters inside its parenthesis, but, it takes a prompt in the form of a string inside it's parenthesis. For example: Consider a variable that you created , name, and you want to get input of different name values from the user, so you use the input function with a prompt inside it's parenthesis as shown below: CODE name = input(...

Variables in Python: Python For Beginners

Image
Variables in Python: Python For Beginners Introduction This tutorial is for Python beginners who are confused with the usage of python variables. I will be first starting with the general definition of the term variable and then I will go on to explain it's usage, how it is created and the advantages of using python variables. What is a Variable A Variable is a container or placeholder for storing values while we carry out several tasks inside a Python function. A variable can store integers, float, string,list,tuple and even boolean. How Variables are Created & Declared In Python, we do not need any specific method or syntaxes to create variables. There is no need of explicitly declaring a variable. We just create a variable by assigning it a value with the 'equal to' sign and then a variable is created immediately! For Example: name = "Tracy Wills" age = 25 year = 2025 In the above examples, we created a variable by assigning it a value of "Tracy Wills...

What are Python Function Parameters and Arguments

Image
 Python Functions : Parameters &  Arguments  INTRODUCTION \ As a beginner learning Python, we are always coming across the terms parameters and arguments frequently and many new coders are often confused with the two different terms parameters and arguments, with the consequence that they even use it wrongly many times. This post is to sort out the differences between the two terms, parameters and arguments accordingly to their usage in Python functions. WHAT ARE PARAMETERS A parameter in Python is actually a variable created in that function, that works like a placeholder for some data value that the function will be use later.  For example, if we consider an example a function add_num which is used to add two numbers, then it will be written the following manner:  def add_num(x,y): In this above situation, add_num is the name of the function with a task of adding the two number variables x and y. def or define is used to define or descraibe the function by...

Essentials About Python def Keyword

Image
 Essentials About Python def Keyword INTRODUCTION For all those code newbies who find it hard to digest the usage and where withals of  the term def that appears a lot of time while coding in Python, here is a great news! I am going to explain not only what is the def that is used so frequently in all of the Python projects, but also, it's usage, why it is used and how it is used in detailed steps. WHAT IS def The def keyword is used for describing or defining a Python function in which we need to implement certain specified tasks. We require various tasks to be done inside a function, such as calculating the sume of numbers, carrying out subtraction of numbers, finding the average of numbers, finding Grades based on score , etc. I will be outlining below, the various tasks that could be performed inside the def function and I will be also guiding you on each of them step-by-step citing examples along the way. WRITE THE STRUCTURE OF  A def Function def function_name(param...