Browsed by
Category: Learn Python

This section contains all the artifacts related to Learning Python like Python Tutorials, videos and programs.

for loop in Python

for loop in Python

Hi Friends…lets continue our Python Tutorials journey with ‘for loop in Python’. Python for loop is used is when we want to iterate over an activity more than one time.Although while loop also does the same thing but we use for loop, when we know the number of times we want our loop to execute. In while loop, we are not sure how many times we want to execute; the loop continues till the condition is True. Also, in for…

Read More Read More

Python while loop

Python while loop

In this Python Tutorial, we will see the use of Python while loop. But before that lets ask what exactly is loop and why do we need it. Loop is something which performs some activity as long as you want it to be done. For example, if we want to play tennis if it’s not raining outside, then we may write something like this: while its_not_raining_outside: lets_play_tennis() Indentation rules work here just like if-else statement we saw in previous session….

Read More Read More

if-else statement in Python

if-else statement in Python

In this tutorial, we will see the use of if-else statement in Python. It is useful when we want to take decision based on some condition. For example, if I am hungry, I will go for lunch. Here I am deciding that I will go for lunch when I am hungry. To code such things, we need if-else statement. Before directly going for Python if-else statement, let’s just revise the Python Operator priorities table and put some more operators: Priority…

Read More Read More

Python Tutorial 6 – Use of Input() function

Python Tutorial 6 – Use of Input() function

Today we will study about the use of Python input function – interacting with computer. This function will enable you to get some data from computer. In a way, print function sends data to the console and input function gets the data from console. The data received via input function can be used in the program for further calculations. The data received via input function always carry string data type. To treat the data as integer or float, we need…

Read More Read More

Python Tutorial 5 – Python Operators

Python Tutorial 5 – Python Operators

Let’s begin our another session use of Python Operators and their priority while using them. Below is the list of commonly used mathematical operators mentioned in the priority in which they will be executed: Operator Usage Priority +(Plus) and (-)minus Used as unary operator 1 **(exponential)   2 *, /, //, %   3 + and – Used as binary operator 4 1) Using plus and minus operator in print function print(3+4) = 7print(3+4.0) = 7.0print(5-4) = 1print(10.0-2) = 8.0…

Read More Read More

Python Tutorial 4 – Python Literals

Python Tutorial 4 – Python Literals

Hi Friends, I hope you would have liked the previous tutorial https://mytechdevice.com/python-tutorial-3-writing-first-program/ about writing basic Python programs. Let`s now begin this tutorial on Python Literals. Literals are something whose value is determined by the literal itself. They represent some fixed value. For ex: 25 – it’s a literal because 25 defines itself as an integer 10.5 – it’s a literal because it defines itself as a decimal/float number “I love Python” – it’s a literal because it defines itself as…

Read More Read More

Python Tutorial 3 – Writing First Program

Python Tutorial 3 – Writing First Program

Hello Friends…. Thanks for visiting my blog again. If you have read my previous blogs, you would have got a fair idea of what Python is and what are its features. Now let’s not waste time and go through this tutorial on Python Basic Program. 1. Let’s begin with Python Basic Program to display “Hello, I am learning Python” on the console. To do that, open Python prompt/IDLE and type below statement. It will print your desired output: print(“Hello, I…

Read More Read More

Python Tutorial 2 – Basic Programming Concepts

Python Tutorial 2 – Basic Programming Concepts

Hi Friends, Today we we will be discussing about some basic Python programming concepts. We have seen details about what Python language is. We have also seen how Java and Python differ from each other in below Python Tutorial. Refer these tutorials: Now it’s time to put our hands-on actual Python programs. However, before we actually dive into programs, let’s just brush up some of the basic concept generic to any programing language. Basically, they are computer fundamentals. What is…

Read More Read More

Python Tutorial 1 – Python Basics

Python Tutorial 1 – Python Basics

Introduction: Python is widely used programming language now-a-days for a wide magnitude of tasks like general programming, web development, data analysis and machine learning. Thanks to a variety of features, most developers are now moving to python language for their development work. Also most IT professionals are intended to Learn Python Language. Python was founded by Guido van Rossum during 1985-1990. Python is a high level language based on Object Oriented programming model. This means that everything that is coded…

Read More Read More