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

Python Training

Rating
-
Sold
-
Pages
29
Uploaded on
07-07-2023
Written in
2022/2023

Python is a general-purpose programming language that is used for a wide variety of tasks, including web development, data science, and machine learning. It is a high-level language, which means that it is relatively easy to read and write. Python is also an interpreted language, which means that it is not compiled into machine code before it is executed. This makes Python a very versatile language that can be used on a variety of platforms.

Show more Read less
Institution
Course

Content preview

LAB MANUAL

PYTHON


Prepared By
Dr. Nasim Hasan




1

, Contents
Table of Content........................................................Error! Bookmark not defined.
Chapter 1: Introduction to Python............................................................................... 4
1.2 What is Python? ................................................................................................ 4
1.3 History of Python .............................................................................................. 4
1.4 Why use Python? .............................................................................................. 4
1.5 Python syntax .................................................................................................... 4
1.6 Python data types .............................................................................................. 4
1.7 Python operators ............................................................................................... 4
1.8 Downloading & Installing Python .................................................................... 5
Chapter 2: Control Flow Statements .........................................................................10
2.1 If statements ....................................................................................................10
2.2 While loops .....................................................................................................11
2.3 For loops..........................................................................................................11
2.3 Break and continue statements........................................................................12
2.4 Exceptions .......................................................................................................13
Chapter 3: Functions .................................................................................................15
3.1 Defining functions...........................................................................................15
3.2 Calling functions .............................................................................................15
3.3 Passing arguments to functions .......................................................................15
3.4 Returning values from functions .....................................................................15
Chapter 4: Modules ...................................................................................................17
4.1 What is a module? ...........................................................................................17
4.2 Importing modules ..........................................................................................17
4.3 Using modules.................................................................................................17
4.4 Creating modules ............................................................................................17
Chapter 5: Object-Oriented Programming ................................................................19
Chapter 6: Input and Output......................................................................................20
6.1 Reading input from the user ............................................................................20
2

, 6.2 Writing output to the screen ............................................................................20
6.3 Reading and writing files..............................................................................20
Chapter 8: List of experiment Basic Level ...............................................................21
8.1 Find the maximum of two numbers: ...........................................................21
8.2 Find the sum of two numbers: .....................................................................21
8.3 Find the difference of two numbers: ...............................................................22
8.4 Find the product of two numbers: ...................................................................22
8.5 Find the quotient of two numbers: ..................................................................22
8.6 Find the remainder of two numbers: ...............................................................23
8.7 Check if a number is even or odd: ..................................................................23
8.8 Check if a number is positive or negative: .....................................................24
8.9 Check if a number is prime: ............................................................................24
8.10 Check if a number is Armstrong: ..............................................................25
8.11 Check if two strings are anagrams: ...........................................................25
8.12 Find the factorial of a number:..................................................................26
8.13 Find the Fibonacci sequence: .....................................................................26
8.14 Find the GCD of two numbers: .....................Error! Bookmark not defined.
8.15 Calculate the area of a circle. .....................Error! Bookmark not defined.
8.16 Convert a temperature from Fahrenheit to Celsius. ...............................28




3

Written for

Institution
Course

Document information

Uploaded on
July 7, 2023
Number of pages
29
Written in
2022/2023
Type
OTHER
Person
Unknown

Subjects

$9.39
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
nasimhasan

Get to know the seller

Seller avatar
nasimhasan Mattu University
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
2
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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