Core Python lesson-1 | From scratch to loops

History of Python :

Why we learn Python?

  • Interpreted Language
  • Object-Oriented Language
  • Open Source Language
  • Extensible
  • Learn Standard Library
  • GUI Programming Support
  • Integrated
  • Embeddable
  • Dynamic Memory Allocation
  • Wide Range of Libraries and Frameworks

Python is Platform-Independent or dependent ?

Python First Program:

1. sum of two numbers :

2. String input from keyboard :

Python Comments:

Python If-else statements :

1.Program to check whether a person is eligible to vote or not:

2: Program to check whether a number is even or not:

elif statement:

1.Checking number equality :

Nested if statement :

1.Program to print the largest of the three numbers.

Loops :

1.print number with for loop:

Nested for loop:

1.print star pyramid

2.Program to number pyramid:

Using else statement with for loop:

1.print number upto range given:

While loop in python :

1.Print i as long as i is less than 6:

2: Program to print table of given numbers:

Break statement in python:

1.use of break statement in while loop :

2.use of break statement in for loop :

Continue statement in python :

1.use of Continue statement in while loop :

2.use of Continue statement in for loop :

--

--

--

Eat. Sleep. Code. Repeat

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Java Program to Check if a Given Matrix is an Identity Matrix

This snake is my bees’ best friend

Kindle phases out support for .mobi, adds support for .epub

How Building Drones Made Me A Better Engineer!

I Quit Chrome and So Can You!

Active Record with Ruby

The 4 Defining Principles of a Successful QA Testing Project

Configuring Web Server and Load Balancer using Ansible Roles…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ahin Das

Ahin Das

Eat. Sleep. Code. Repeat

More from Medium

How To Create a Todo Application in Python Flask

Easier Python Package Deploying

An Overview on Tenso

Real Python