0% found this document useful (0 votes)
197 views21 pages

Become A Python Developer in 45 Days - Bababaana

This document provides an overview of learning Python programming through Netzwerk Academy's book. The book introduces Python programming over 6 chapters that cover: 1) Introduction to Programming, 2) Introduction to Python, 3) Installation, 4) Writing a First Python Program, 5) Data Types, and 6) A Simple Calculator Program. It aims to teach Python programming to beginners with no experience over 45 days.

Uploaded by

shiva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
197 views21 pages

Become A Python Developer in 45 Days - Bababaana

This document provides an overview of learning Python programming through Netzwerk Academy's book. The book introduces Python programming over 6 chapters that cover: 1) Introduction to Programming, 2) Introduction to Python, 3) Installation, 4) Writing a First Python Program, 5) Data Types, and 6) A Simple Calculator Program. It aims to teach Python programming to beginners with no experience over 45 days.

Uploaded by

shiva
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Netzwerk Academy

Become a
Python
Developer.
You can become a Python
Developer in 45 Days!
02

What's Inside the Book?


1. Introduction to Programming
2. Introduction to Python programming
3. Installation
4. Writing 1st program with Python
5. Introduction to Data types
6. A simple calculator using Python
03

01 INTRODUCTION

TO PROGRAMMING

This book is intended for beginners who


have no or almost no computer
programming experience. It assumes the
reader is following the instructions and
reading the text carefully.

Computer programming requires a fair


amount of time to master. However, the
time invested will be more than worth it.
Besides learning a useful, entertaining,
and very creative activity, you will also
learn a lot about computers and the way
they work.

The basic components of a computer are:


1. Input unit
2. Central Processing Unit(CPU)
3. Output unit
04
Most Popular Programming Languages
C
Python
C++
Java
SCALA
C#
R
Ruby
Go
Swift
JavaScript

Characteristics of a programming
language:-

A programming language must be


simple, easy to learn and use, have
good readability, and be humanly
recognizable.

Abstraction is a must-have
Characteristic for a programming
language in which the ability to
define the complex structure and
then its degree of usability comes.
05
A portable programming language is
always preferred.

Programming language’s efficiency


must be high so that it can be easily
converted into a machine code and
executed consumes little space in
memory.

A programming language should be


well structured and documented so
that it is suitable for application
development.

Necessary tools for the development,


debugging, testing, maintenance of a
program must be provided by a
programming language.

A programming language should


provide a single environment known
as Integrated Development
Environment(IDE).

A programming language must be


consistent in terms of syntax and
semantics.
06

02 INTRODUCTION

TO PYTHON

PROGRAMMING
What is Python?
Python is a popular programming
language. It was created by Guido van
Rossum, and released in 1991.

It is used for:
web development (server-side),
software development,
mathematics,
system scripting.

What can Python do?


Python can be used on a server to
create web applications.
Python can be used alongside
software to create workflows.
Python can connect to database
systems. It can also read and modify
files.
07
Python can be used to handle big
data and perform complex
mathematics.
Python can be used for rapid
prototyping, or for production-ready
software development.

Why Python?

Python works on different platforms


(Windows, Mac, Linux, Raspberry Pi,
etc).
Python has a simple syntax similar to
the English language.
Python has a syntax that allows
developers to write programs with
fewer lines than some other
programming languages.
Python runs on an interpreter system,
meaning that code can be executed
as soon as it is written. This means
that prototyping can be very quick.
Python can be treated in a procedural
way, an object-oriented way or a
functional way.
08
Python Syntax compared to other
programming languages

Python was designed for readability


and has some similarities to the
English language with influence from
mathematics.

Python uses new lines to complete a


command, as opposed to other
programming languages which often
use semicolons or parentheses.

Python relies on indentation, using


whitespace, to define scope; such as
the scope of loops, functions and
classes. Other programming
languages often use curly brackets for
this purpose.
09
Python Pros and Cons:
02
Pros of Using Python:

Easy to Use Programming Language


Easy to learn
Great for Visualizing Data
Easy to Read Language
Unmatched Flexibility

Cons of Using Python:

Python being an interpreted


programming language is slower than
other programming languages.
The Global Interpreter Lock (GIL) of
Python doesn't allow executing more
than one thread at a given time. This
creates significant limitations for the
language.

Advantages of Python:

1) Compiler and the Interpreter are the 2


types of Coding Software, python is an
Interpreter.
10

2) No Data Type Declaration Needed (Pre


Memory Allocation is not applicable)

3) Scripting Language (No Compiler)

4) No License

5) Unstructured

6) Very Simple & less syntax complexity

7) More Packages (Library) support.

8) Dynamic Memory (Run time memory


allocation)

9) Automated Garbage collection.

10) Private Heap


11

03 INSTALLATION OF

PYTHON
Installation of Python:

Step 1: First go to Google search engine


and then type in the search bar
www.python.org/downloads/

Step 2: This page will open then press


the enter button and the python official
website will be loaded on the web
browser. Click on the Downloads python
menu bar.
12

Installation of Python:

Step 3: The list of different OS(Operating


System) is opened according to your pc’s
operating system. Choose the windows or
mac operating system etc.
13

Step 4: After step 3, click on the windows


and you can see the different versions of
the python installer. According to your pc
configuration [OS(windows 7,8,10), Bit (32
bit or 64bit )] choose the python idle
installer. We install the executable installer.
Step 5: Before clicking on the installation
link, select the checkboxes that are given
on the bottom side.

Step 6: The python idle setup is in progress.


14
Step 7: Now the python idle installation
has been successfully completed and
then click on the close button.

Step 8: Go to the windows button and


type in the search bar “python idle” and
press the enter button.

Step 9: The python idle is opened


successfully
15

04 WRITING 1ST

PROGRAM WITH

PYTHON

Code for printing statements in different


languages:

C Programming:

#include <stdio.h>
int main() {
// printf() displays the string inside
quotation
printf("Hello, World!");
return 0;
}
16

JAVA:

class HelloWorld
{
public static void main(String[ ] args)
{
System.out.println("Hello, World!");
}
}

Python:

Print(“Hello, world”)

That's how simple Python programming


is.
17

05 INTRODUCTION TO

DATA TYPES IN

PYTHON

Data types are Mutable and Immutable


Categories:
Different Datatypes String, List, Tuples,
Dictionary, Numerical, Set and Frozen set

What is Mutable?
Mutable sequences can be changed after
creation. Some of Python’s mutable data
types are lists, byte arrays, sets, and
dictionaries.
18
What is Immutable?

Immutable data types differ from their


mutable counterparts in that they cannot
be changed after creation. Some
immutable types include numeric data
types, strings, bytes, frozen sets, and
tuples.

Data Type Representation:

String

Strings in python are surrounded by


either single quotation marks, or double
quotation marks. 'hello' is the same as
"hello". Assign String to a Variable
Assigning a string to a variable is done
with the variable name followed by an
equal sign and the string:

a = "Hello"
print(a)
19

05 A SIMPLE

CALCULATOR USING

PYTHON

Input:

# Python program for simple calculator

# Function to add two numbers


def add(num1, num2):
return num1 + num2

# Function to subtract two numbers


def subtract(num1, num2):
return num1 - num2

# Function to multiply two numbers


def multiply(num1, num2):
return num1 * num2

# Function to divide two numbers


def divide(num1, num2):
return num1 / num2
20
Input:

# Python program for simple calculator

# Function to add two numbers


def add(num1, num2):
return num1 + num2

# Function to subtract two numbers


def subtract(num1, num2):
return num1 - num2

# Function to multiply two numbers


def multiply(num1, num2):
return num1 * num2

# Function to divide two numbers


def divide(num1, num2):
return num1 / num2

Output:

Please select operation -


1. Add
2. Subtract
3. Multiply
4. Divide
Select operations form 1, 2, 3, 4 : 1
Enter first number : 15
Enter second number : 14
15 + 14 = 29
21

CLICK ON THE ABOVE ICONS

TO CONNECT WITH US!

You might also like