Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

easy to learn python

Rating
-
Sold
-
Pages
373
Uploaded on
20-07-2024
Written in
2020/2021

Certainly! A Python script or module is a text file containing Python code designed to perform specific tasks or functions. These documents typically begin with import statements to access external libraries or modules required for the program's operations. Following this, you'll find functions and classes defined using keywords like def and class, respectively, to encapsulate logic and data within reusable units. Comments throughout the code provide explanations and context, while docstrings offer detailed documentation for functions, classes, or modules, aiding in understanding their purpose and usage. Error handling mechanisms ensure robustness by managing unexpected situations gracefully, enhancing the script's reliability. Additionally, some scripts include a main execution block guarded by if __name__ == '__main__', allowing direct execution when run as a standalone script. Overall, Python documents serve as the foundation for creating applications, automating tasks, or implementing algorithms, leveraging Python's versatility and readability to achieve various computational goals efficiently.

Show more Read less
Institution
Course

Content preview

UNIT - 1

Python Language Fundamentals
Topics Covered:
Introduction

Application areas of Python

Features of Python

Limitations of Python

Flavours of Python

Python Versions

Identifiers

Reserved Words

Datatypes

Typecasting


NOTE: If you really strong in the basics, then remaining things will become so easy



L1: What is Pyhton?

It is a Programming Language.

- We can develop applications by using this programming language.

We can say that, Python is a High-Level Programming Language. Immediately you may get doubt that,
What is the meaning of High-Level Programming Language.

- High-Level means Programmer friendly Programming Language. This means we are not
required to worry about Low-level things [i.e., Memory management, security, d
estroying the objects and so on.]



- By simply seeing the code programmer can understand the program. He can write th
e code vey easily.



- High level languages are Programmer friendly languages but not machine friendly
languages.



Let's take the following example,
localhost:8888/notebooks/Desktop/PythonCourse/Python Language Fundamentals.ipynb 1/81

, Python Language Fundamentals
Let s take the following example,
a = 10

b = 20

c = 30 if a>b else 40

print(c)

Do you Know, if we can take this code, are in a position to understand this code?

You are not required to have any programming knowledge.

By observing the code you can say that, the value stored in C is 40

If you have the kid, can you please show this 4 lines code and ask what is the ouput, your kid is able to answer
without having any hesitation. This type of thing is called as High level programming.

Examples of High Level Programming Languages :

C

C++

Java

C#

Python


You may get doubt that, you are writing just 4 lines code, is it really a Python code? Is it going to Work?

Let's execute and see what happens,


In [1]:

a = 10

b = 20

c = 30 if a>b else 40

print(c)

40


It is perfectly Python code. This is called High level programming.



Python is a General Purpose High Level Programming Language.

Here, General Purpose means Python is not specific to a particular area, happily we can use Python for any
type of application areas. For example,

Desktop Applications

Web Applications


localhost:8888/notebooks/Desktop/PythonCourse/Python Language Fundamentals.ipynb 2/81

,14/04/2020 Python Language Fundamentals

Data Science Applications

Machine learning applications and so on.

Everywhere you can use Python.



L2: Who Developed Pyhton?

Who provides food for most of the programmers across the worldwide.

Guido Van Rossum developed Python language while working in National Research Institute (NRI) in
Netherland.

When he developed this Language?

Most of the people may think that so far we are heared about Java, C and C++ and we are recently knowing
about python (especially in our INDIA) and they may assume that Python is a new programming language and
Java is a old programming language.

Java came in 1995 and officially released in 1996.

Python came in 1989, this means that Python is Older programming language tha Java. Even it is
developed in 1989, but it is not released to the public immediately.

In 1991, Pyhton made available to the public. Officially Python rleased into the market on 21-02-1991 (i.e.,
First version).

Then, Immediately you may have a doubt that, Why Python suddenly (in 2019) became Popular?

Generally Market rquirements are keep on changing from time to time.

Current market situation is, every one talks about

- I need Simple Language (i.e., Easy to understandable)

- I have to write very less (or) concise code to fulfill my requirement.

- In these days, everyone talks about AI, Machine Learning, Deep Learning, Neural
networks, Data Science, IOT.For these trending requirements, best suitable program
ming language is Python.

That's why in these days, Python becomes more popular programming language.

For example, Suppose you have a diamond. When there is a value for that diamond is, if the market
requirement is good for that, then automatically this diamond value grows.



Date: 10-04-2020 - Day 2

L3. Easyness of Python compared to other programming languages

If you want to learn Python programming, what is the prerequisite knowledge required?

The answer for the above Question is:
localhost:8888/notebooks/Desktop/PythonCourse/Python Language Fundamentals.ipynb 3/81

, 14/04/2020 Python Language Fundamentals

Nothing is required, If you are in a position to read English statements, that is enough to learn Pyhton
programming.


Eg:

If you are learning any programming language, the first application which we discuss is Hello World
application.


In 'C'

1) #include <stdio.h>

2) void main()

3) {

4) printf("Hello World");

5) }


In 'Java'


1) public class HelloWorld

2) {

3) public static void main(String[] args)

4) {

5) System.out.println("Hello world");

6) }

7) }


In 'Python


In [1]:

print("Hello World");

Hello World


In [3]:

print("Hello World") # ';' is also optional

Hello World


Just to print 'Hello World',

C language takes 5 lines of code

Java takes 7 lines of code

But, Python takes only one line of code.
localhost:8888/notebooks/Desktop/PythonCourse/Python Language Fundamentals.ipynb 4/81

Written for

Course

Document information

Uploaded on
July 20, 2024
Number of pages
373
Written in
2020/2021
Type
OTHER
Person
Unknown

Subjects

$8.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
vasundharaj

Get to know the seller

Seller avatar
vasundharaj scm hss
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions