Posts

Showing posts from January, 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(...

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...