PeakNotes - Your Ultimate Resource for Coding Tips and Tutorials

Free python practice set & course (no fees)

Python programming tutorial

Welcome to the exciting world of Python programming brought to you by PeakNotes.in! Whether you're a novice eager to embark on your coding journey or an experienced developer looking to enhance your skills, you've come to the right place. Our Python programming tutorial is designed to be your comprehensive guide, providing step-by-step instructions, practical examples, and valuable insights to help you grasp the fundamentals and advance your proficiency in Python.




What is Python?

Simple and easy to understand language which feels like reading simple English. This Pseudo code nature of python makes it easy to understandable by beginners.

feature of Python

  • Easy to understand = less development time
  • free and open source
  • High level language
  • portable  → work an Linux/window/mac. 

Installation

Python can be easy to installed from Python.org When you click on the download button, python can be installed right after you complete the setup by executing the file for your platform.

Table of contents

  1. chapter 1. Modules, Comments & Pip
  2. chapter 2. Variable and data Types
  3. chapter 3. String
  4. chapter 4. Lists & Tuples
  5. chapter 5. Dictionary & Sets
  6. chapter 6. Conditional Expression
  7. chapter 7. Loops in Python
  8. chapter 8. Function and Recursion
  9. chapter 9. file I/O
  10. chapter 10. OOPs
  11. chapter 11. Inheritance


Chapter 1.  Modules, Comments & Pip

crate a file called hello.py  and paste the below code in it.
  
    print("Hello world")                Print is function

Execute this file (.py file) by typing python hello.py and you will see Hello world printed  on the screen.


Modules 
A Modules is a file Containing code written by somebody else(usually) which can be imported and used in our programs

Pip
Pip is a package manager for Python you can use pip to install a module on your System.
 example:-  pip install Flask


Types of modules 

There are two types of modules in python.
  1.  Built in modules
  2. External modules
Some of example Built in modules are: OS . obc , etc.
Some of example External modules are :  Tensorflow , flask.


Using Python as a Calculator
We can use python as a calculator by typing  "Python +  enter " on terminal

Comment

Comment are used to write Something which the programmer does not want to execute

types of comment

  1. single line (#)
  2. multi line ('''       '''')









Post a Comment

0 Comments