Python

By | May 10, 2020

Python is a popular programming language.

It is used for software development.

Python is used to handle big data and to perform complex operations.

Python works on different platforms  like windows, mac, linux, raspberry pi.

Python code is readable and it is similar to combination of english and mathematics.

While loop in python:

Output:

for – continue:

Output:

while – break:

Output:

for loop in python:

Output:

range() function in python:

It returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.

Syntax:

range(start, stop, step)

start: optional. Default is 0. Number specifying the position to start.

stop: Required. A number specifying the position to end.

step: optional. Default is 1. Increments by given number.

Ex:

Output:

Ex:

Output:

Ex:

Output:

Ex:

Output:

 

.

Leave a Reply

Your email address will not be published. Required fields are marked *