0% found this document useful (0 votes)
2 views15 pages

Lesson Plan Python Programming and Applications

Yyhdhdhshshsbsbbdé jéjejeheheb3hhehehehsbsbsbbsbsbsbsbsbshdbdhdhdhdhdhdhdhdhdhdhdhdhdhdhdhhdhdhdhshshshshsjjsjs

Uploaded by

Amhi Beedkar
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)
2 views15 pages

Lesson Plan Python Programming and Applications

Yyhdhdhshshsbsbbdé jéjejeheheb3hhehehehsbsbsbbsbsbsbsbsbshdbdhdhdhdhdhdhdhdhdhdhdhdhdhdhdhhdhdhdhshshshshsjjsjs

Uploaded by

Amhi Beedkar
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/ 15

MIT Vishwaprayag University, Solapur

School of Computing

Course Plan
Semester: I Year: 2025-26
Course Title: Python Programming and Applications Course Code: SC2024
Total Contact Hours: 90 Duration of TEE: 03 hours
TEE Marks: 20 CIA Marks: 80
Lesson Plan Authors: Dr. Amit Kumar Chanchal Date: 25/08/2025
Checked By: Mr. Krishnendu Jana Date: 25/08/2025
Prerequisites: Students are expected to have basic knowledge of computers, a fundamental understanding
of mathematics, and prior exposure to introductory programming concepts.
Course Outcomes-(CO)

At the end of the course students will be able to:


i. Explain the process of problem-solving using python programming.
ii. Illustrate the process of structuring the data using lists, tuples and dictionaries.
iii. Write maintainable (modular and using coding standards) programs using the relevant
features / constructs of Python programming.
iv. Perform data analysis and visualization using Python tools.
v. Use Python libraries for basic predictive modeling.
vi. Apply Python programming concepts to basic network applications using HTTP, web
data retrieval, and APIs.

Course Articulation Matrix:

COs/
POs PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2

CO1 M
CO2 M
CO3 M H
CO4 M H
CO5 M H
CO6 M H

Page 1 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Course Content
Course Code: SC2024 Course Title: Python Programming and Applications
L-T-P: 0:0:3 Credits: 3 Contact Hrs: 90
CIA Marks: 80 TEE Marks: 20 Total Marks: 100
Unit I

No Content Hrs
Python Fundamentals: Writing and Executing Python Program, Literal
Constants – Numbers, Strings, Variables and Identifiers, Data Types – Assigning
or Initializing Values to Variables, Multiple Assignment, Multiple Statements on a
1
Single Line, Boolean, Input Operation, Operators and Expressions, Expressions in
Python, Operations on Strings – Concatenation, Multiplication (or String
Repetition), Slice a String, Other Data Types – Tuples, Lists, Dictionary. 16
Decision Control, Loops, and Functions: Selection/Conditional Branching
Statements – if Statement, if-else Statement, Nested if Statements, if-elif-else
Statement, Basic Loop Structures/Iterative Statements – while Loop, for Loop,
2 Selecting an Appropriate Loop, Nested Loops, The break Statement, The continue 20
Statement, Functions and Modules – Introduction, Need for Functions, Function
Definition, Function Call, Function Parameters, Variable Scope and Lifetime, The
return Statement, Recursive Functions.
File Handling: Introduction, File Path, Types of Files – ASCII Text Files, Binary
Files, Opening and Closing Files – open() Function, File Object Attributes, close()
3 Method, Reading and Writing Files 12
Classes and Objects: The concept of OOPS in Python, Designing classes, Creating
objects, Accessing attributes, Editing class attributes, Built-in class attributes.
Unit II
Python for Data Analysis and Visualization with NumPy, Pandas, Matplotlib,
and Seaborn: NumPy Implementation – Create and manipulate multi-dimensional
arrays and matrices, Perform mathematical operations using NumPy functions,
Pandas for Data Analysis – Load and explore datasets using DataFrames, Perform
4 12
data cleaning, filtering, and aggregation, Data Visualization with Matplotlib –
Generate line plots, bar charts, and scatter plots, Customize visual elements such as
labels, legends, and colors, Statistical Visualization with Seaborn – Create
histograms, box plots, and heatmaps.
Applications of Python in Machine Learning & Deep Learning (using Scikit-
learn, TensorFlow, and Keras): Introduction to Scikit-learn – Basics and data
preprocessing; Clustering and Model Evaluation – K-Means clustering; Building
5 20
simple linear regression and classification models; Evaluating classification
models; TensorFlow and Keras – Building simple neural networks (Multi-Layer
Perceptron); Setting up and training models for classification.

Page 2 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Unit – III

Network Programming and Web APIs using Python: Introduction to Networked


6 Programs, Working with HTTP, Retrieving Images and Files over HTTP, 10
Retrieving Web Pages with urllib, Application Programming Interfaces.
Text Book:
1. Reema Thareja, Python Programming: Using Problem Solving Approach, 2nd Edition, Oxford
University Press, 2019.
2. Charles R. Severance, “Python for Everybody: Exploring Data Using Python 3”, 1st Edition,
CreateSpace Independent Publishing Platform, 2016. (http://do1.drchuck.
com/pythonlearn/EN_us/pythonlearn.pdf )
3. Allen B. Downey, "Think Python: How to Think Like a Computer Scientist”, 2ndEdition,
Green Tea Press, 2015. (http://greenteapress.com/thinkpython2/thinkpython2.pdf)

Reference Books:
1. Tony Gaddis, "Starting Out with Python," (Global Edition, 6th Edition), Pearson, 2024.
2. Aurélien Géron, "Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow,"
2nd Edition, O’Reilly Media, 2019.

Evaluation Scheme
Assessment Name Blooms Marks
Level
Lab Assignments L3 20

MCQ L3 10

Course Project L4 25

Hacker Rank: Online Coding Challenges L4 25

Total 80

Course Project Rubric


Excellent (90- Satisfactory (50- Needs Improvement Poor (0-
Criteria 100%) 69%) (30-49%) 29%)
Problem Clearly identifies Identifies the Partially identifies the Fails to
Identific and defines the problem but lacks problem with significant identify the
ation problem. detail or context; gaps; minimal problem or
(10%) Demonstrates a limited recognition understanding of Python provides an
thorough tools or datasets. unclear

Page 3 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Excellent (90- Satisfactory (50- Needs Improvement Poor (0-


Criteria 100%) 69%) (30-49%) 29%)
understanding of the of Python tools or definition;
problem’s context datasets. does not
and dataset consider
requirements. dataset
implementa
tion.
Program Program meets all Program meets some Program meets few Program
Function requirements, requirements; requirements; significant fails to meet
ality executes correctly, noticeable errors in errors in execution, requirement
(20%) handles dataset execution, partial dataset handling, or s; functions
processing, handling of Python network tasks. incorrectly
visualization, tools or datasets. or not at all.
network calls, or
model tasks
accurately, with no
errors.
Code Code is well- Code is somewhat Code is poorly organized Code is
Design organized, modular, organized but has with significant issues. disorganize
& and follows best several issues. Inadequate use of d and
Structur practices. Excellent Adequate use of functions or Python difficult to
e (15%) use of functions, functions, comments, libraries; minimal follow.
comments, naming and Python libraries. comments. Little or no
conventions, and use of
Python libraries for functions or
dataset operations. libraries;
lacks
comments
and naming
conventions
.
Working Efficiently loads, Handles some Limited ability to work Fails to
with a processes, analyzes, datasets; noticeable with datasets; significant work with
Variety visualizes, and errors or incomplete errors or missing datasets or
of models multiple functionality. implementations. use Python
Datasets types of datasets libraries
(40%) (CSV, Excel, JSON, effectively.
images, etc.) using
appropriate Python
libraries.
Docume Code is fully Partially Poorly documented; Not
ntation documented; clear, documented; some difficult to read and documented
& readable, and easy readability issues. understand. ; code is
Readabil to follow. Includes unreadable
ity meaningful or
(15%) comments, confusing.

Page 4 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Excellent (90- Satisfactory (50- Needs Improvement Poor (0-


Criteria 100%) 69%) (30-49%) 29%)
docstrings, and
organized structure.

Chapter wise Plan


Course Code and Title: SC2024 Python Programming and Applications
Chapter Number and Title: 1. Python Fundamentals: Planned Hours: 16 hrs

Learning Outcomes: At the end of the topic student should be able to:

Sr.No TLO’s CO’s BL


1 Execute Python programs 1 L2
2 Identify literal constants (numbers, strings) 1 L1
3 Use variables and identifiers 1 L3
4 Recognize Python data types and assign values 1 L2
5 Perform operations using Boolean and operators 1 L3
6 Manipulate strings: concatenate, repeat, slice 2 L3
7 Work with lists, tuples, and dictionaries 2 L3
8 Perform input and output operations 1 L3

Lesson Schedule
Class No. Portion covered per session
1. Writing and executing Python programs - Python IDEs and environment setup
2. Literal constants: Numbers, Strings - Variables and Identifiers
3. Python data types - Assigning/Initializing values, Multiple assignment and statements on a
single line
4. Boolean type and logical values- Taking user input (input() function)
5. Types of operators (arithmetic, relational, logical, etc.)- Expressions in Python
6. Concatenation and multiplication (string repetition) - String slicing
7. Advanced string slicing and indexing - Practical examples of string operations
8. Introduction to Tuples, Lists, and Dictionaries - Basic operations on these data types

Review Questions

Page 5 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Sr.No Questions TLO BL


1 Write a program that uses input to prompt a user for their name and then 1 L2
welcomes them.
2 Write a program to prompt the user for hours and rate per hour to compute 2 L2
gross pay.
3 a. The volume of a sphere with radius r is (4/3)πr³. What is the volume of a 3 L2
sphere with radius 5?
b. Suppose the cover price of a book is $24.95, but bookstores get a 40%
discount. Shipping costs $3 for the first copy and $0.75 for each additional
copy. What is the total wholesale cost for 60 copies?

c. If I leave my house at 6:52 am and run 1 mile at an easy pace (8:15 per
mile), then 3 miles at tempo (7:12 per mile) and 1 mile at easy pace again,
what time do I get home for breakfast?

4 String Slicing – Extract Substring 4 L2


Question:
Given a string message = "PythonProgramming",
• Write code to extract the substring "Python" from it using slicing.
• Write code to extract "Programming" from it using slicing.
5 Write a Python program that accepts a string input and prints the reversed 5 L2
string using slicing.
• Example Input: "Electronics"
• Expected Output: scinortcelE

6 Write a Python program that takes a password as input and hides all characters 6 L2
except the first and last character using *.
Use string slicing and string repetition for masking.
• Example Input: "electronics"
• Expected Output: e********s
7 Write a Python program to create a list of marks scored by students in five 6 L2
subjects and:
1. Calculate the average.
2. Display the highest and lowest marks.
8 Python program to create a 2D list to represent student marks in multiple 7 L2
subjects and calculate total marks for each student.

Page 6 of 15
MIT Vishwaprayag University, Solapur
School of Computing

9 Write a Python program to create a tuple with names of 5 Indian states and 7
perform:
• Display first three states using slicing.
• Check whether a given state exists in the tuple.

10 Create a dictionary to store Roll_No as key and Marks as value for 5 students, 8 L3
then:
• Display all keys and values.
• Print the student with the highest marks.

Chapter wise Plan


Course Code and Title: SC2024 Python Programming and Applications
Chapter Number and Title: 2. Decision Control, Loops, and Functions: Planned Hours: 20 hrs

Learning Outcomes:
At the end of the topic student should be able to:
Sr.No TLO’s CO’s BL
1 Explain the need for decision-making statements in Python. 2 L2
2 Identify different conditional branching statements (if, if-else, if-elif-else, 2 L1
and nested if).
3 Write Python programs using conditional branching statements. 2 L2
4 Describe the purpose and syntax of iterative statements (while and for). 2 L2
5 Select an appropriate loop for solving a given problem. 2 L3
6 Apply break and continue statements in loops to control flow. 2 L3
7 Explain the need for functions and modular programming in Python. 3 L3
Demonstrate function definition, function call, and parameter passing in 3 L3
8
Python.
9 Distinguish between variable scope and lifetime in functions. 3 L3
10 Develop recursive functions to solve computational problems. 3 L3

Page 7 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Lesson Schedule:
Class No. Portion covered per session
9. Introduction to Control Structures: Overview of decision-making and control structures,
Importance of conditional and iterative statements
10. The if Statement: Syntax and use of if statement, Simple decision-making problems,
Indentation rules in Python
11. if-else Statement, Syntax and flow of if-else, Problem-solving using two-way branching
12. Nested if and if-elif-else Statements: Concept of nested if, Syntax and use of if-elif-else, Real-
world examples
13. Introduction to Iteration – while Loop, Concept of iteration, Syntax of while loop, Flowchart
representation,
14. For Loop and Range Function: Syntax of for loop, range() function, Iterating over sequences
(lists, strings, etc.), pattern printing
15. Selecting Appropriate Loops and Nested Loops, Difference between for and while loops,
Criteria for selecting a loop, Nested loops with examples
16. Loop Control Statements: break and continue, Purpose and use of break and continue
17. Functions and Modular Programming, Introduction to functions, Need for modular
programming, Function definition and function call, Parameters and return statement
18. Variable Scope, Lifetime, and Recursion: Types of variable scope: local, global, Lifetime of
variables, Recursive functions with examples (e.g., factorial, Fibonacci), Advantages and
disadvantages of recursion.

Review Questions:
Sr.No Questions TLO BL
1 Write a program that keeps asking the user to guess a secret number between 1 1 L2
and 9. If the guess is wrong, the prompt repeats. When the guess is correct, print
“Well guessed!” and exit the loop.
2. Prompt for an integer n, then print its multiplication table up to 10 using a for 2 L2
loop.
3. Using nested for loops, print the given pattern 3 L3

Page 8 of 15
MIT Vishwaprayag University, Solapur
School of Computing

4. Iterate numbers from 1 to 20 using a loop; using continue, skip printing even 5,6 L2
numbers, so only odd numbers appear.
5. Define a function print_twice(s) that takes a string s and prints it twice. Call 7,8 L3
this function with the argument "Hello, world!"
6 Write a function is_triangle(a, b, c) that takes three integers and prints “Yes” 9 L3
if a triangle can be formed (i.e., no side is greater than the sum of the other
two), else prints “No”.

7 Write a Python program to calculate the sum of a list of numbers using 10 L3


recursion.
8 Write a Python program to solve the Fibonacci sequence using recursion. 10 L4
9 The following program is intended to calculate the sum of numbers from 1 to 10 L3
10 using recursion, but the function is incomplete. Complete the recursive
function so that it returns the correct sum.
def main():
print(sum(10))
def sum(x):
# You complete this function recursively
main()
Expected Output:
55
10 Write a recursive Python function that takes a list of integers and returns the 10 L3
maximum value.
Thinking recursively, the maximum is either the first value in the list or the
maximum of the rest of the list.

Example Input: [4, 10, 7, 15, 2]


Expected Output: 15
def find_max(lst):
# Complete the function to return the maximum recursively

Page 9 of 15
MIT Vishwaprayag University, Solapur
School of Computing

11 Write a Python program to perform the following tasks: 4 L3


1. Using a while loop:
o Continuously prompt the user to enter positive integers.
o Stop taking inputs when the user enters 0 or a negative
number.
o Calculate and display the sum of all numbers entered.
2. Using a for loop:
o From the numbers entered above, identify and print only the
prime numbers.
o Also, display the count of prime numbers found.

Chapter wise Plan


Course Code and Title: SC2024 Python Programming and Applications
Chapter Number and Title: 3. File Handling, Classes and Objects Planned Hours: 12 hrs

Learning Outcomes: At the end of the topic student should be able to:
Sr.No TLO’s CO’s BL
1 Explain the types of files and their uses. 3 L2
2 Use open(), close(), and file object attributes in programs. 3 L2
3 Perform read and write operations on text and binary files. 3 L3
4 Explain the concept of classes and objects in Python. 3 L3
5 Create classes, objects, and attributes in Python programs. 3 L3
6 Modify and access class attributes to implement simple applications. 3 L3

Lesson Schedule:
Class No. Portion covered per session
19. Introduction to File Handling
20. Working with Files – Basics
21. Reading Files
22. Writing and Appending Files
23. Introduction to OOP in Python
24. Working with Class Attributes

Page 10 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Review Questions:
Sr.No Questions TLO BL
1 Reading a File and Displaying Contents: 1,2 L2
1. Open the file in read mode.
2. Read and display each line of the file, converting it to uppercase before
printing.
3. Ensure the program removes any extra newline characters while displaying.
2 Counting the Number of Lines in a File 2 L2
3. Searching for Specific Lines in a File 3 L3
4. Prompt for a Filename and Handle Errors 3,4,5 L3
Prompts the user to enter the filename.
Opens and reads the file.
If the file does not exist, display an error message:

5. Extract and Process Data from a File 4,5,6 L3


6 Write a Python program that creates a Coin class to simulate the tossing of a 3 L3
coin. The class should have a method to toss the coin and another to get the
side that is facing up. Demonstrate the class in a program.
7 Design a Python class named BankAccount that simulates a bank account. 4,5,6 L3
The class should have methods for depositing, withdrawing, and checking the
balance. Write a program to create a BankAccount object and perform these
operations.
8 Create a Python class named CellPhone that stores the manufacturer, model 4,5,6 L3
number, and retail price of a phone. Write a program to create several
CellPhone objects, store them in a list, and display their details.

9 Write a Python program that uses the pickle module to store multiple 4,5,6 L3
CellPhone objects in a file and then retrieves them back from the file.
10 Create a Python class named Contact that stores a person’s name, phone 4,5,6 L3
number, and email address. Write a program to store multiple Contact objects
in a dictionary, using the person’s name as the key, and display the stored
contact information.

Page 11 of 15
MIT Vishwaprayag University, Solapur
School of Computing

UNIT II
Course Code and Title: SC2024 Python Programming and Applications
Chapter Number and Title: 4. Python for Data Analysis and Planned Hours:12 hrs
Visualization with NumPy, Pandas, Matplotlib, and Seaborn

Learning Outcomes:

At the end of the topic student should be able to:


Sr. TLO’s CO’s BL
No
1 Describe the uses of NumPy, Pandas, Matplotlib, and Seaborn. 4 L2
2 Create multi-dimensional arrays and matrices using NumPy. 4 L2
3 Perform mathematical operations with NumPy functions. 4 L3
4 Load datasets using Pandas Series 4 L3
5 Clean and filter datasets using Pandas. 4 L3
6 Customize plots with labels, legends, and colors in Matplotlib. 4 L3
7 Create histograms, box plots, and heatmaps. 4 L3
8 Generate line, bar, and scatter plots using Matplotlib. 4 L3
9 Analyze data patterns. 4 L3
10 Interpret results to make data-driven decisions. 4 L3

Lesson Schedule:
Class No. Portion covered per session
25. Introduction to Data Analysis Libraries
26. NumPy Basics – Arrays, NumPy Operations
27. Pandas – Series and DataFrames, Data Cleaning with Pandas
28. Data Aggregation and Grouping
29. Matplotlib Basics – Plots, Customizing Matplotlib Visuals
30. Seaborn Statistical Visualization

Review Questions:

Questions TLO BL
Sr.No
1 Calculate mean, median, and standard deviation using NumPy functions. 1, 3 L3
2 Load an Excel or CSV dataset into a DataFrame., Display column names, data 2
types, and basic info, Display summary statistics of the dataset.
3 Create line plots, bar charts, and scatter plots., Add titles, labels, and legends 4 L3
to plots., Customize plot styles with colors, markers, and line styles., Plot
multiple graphs in a single figure using subplots., Save plots as image files.

Page 12 of 15
MIT Vishwaprayag University, Solapur
School of Computing

4 Create histograms, box plots, and heatmaps for the given datasets. 4 L3
5 Compare distributions between different groups using boxplots. 5 L3
6 (a) Load and display image datasets using Python. 5,6,7, L3
(b) Perform basic image processing tasks such as resizing, grayscale 8,9,10
conversion, and edge detection.
(c) Visualize original and processed images side by side using
Matplotlib

7 (a) Load images and convert them into grayscale. 5,6,7, L3


(b) Apply image enhancement techniques like contrast stretching and 8,9,10
sharpening.
(c) Analyze image histograms for brightness and contrast distribution.
(d) Visualize enhanced and original images for comparison.

Course Code and Title: SC2024 Python Programming and Applications


Chapter Number and Title: 5, Applications of Python in Machine Planned Hours: 20 hrs
Learning & Deep Learning (using Scikit-learn, TensorFlow, and
Keras)
Learning Outcomes:

At the end of the topic student should be able to:


Sr.No TLO’s CO’s BL
1 Explain Scikit-learn and its main features. 5 L2
2 Apply preprocessing techniques. 5 L3
3 Implement K-Means clustering and evaluate results. 5 L3
4 Build a linear regression model using Scikit-learn. 5 L3
5 Construct basic classification models on sample datasets. 5 L3
6 Evaluate classification models using standard metrics. 5 L4
7 Describe the purpose and features of TensorFlow and Keras. 5 L2
8 Design a simple neural network (MLP) in Keras. 5 L4
9 Train a neural network model for classification tasks. 5 L4
10 Demonstrate an end-to-end ML/DL application using real data. 5 L4

Page 13 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Lesson Schedule:
Class No. Portion covered per hour
31. Introduction to Scikit-learn
32. Data Preprocessing with Scikit-learn
33. Clustering and Model Evaluation
34. Building Simple Linear Regression Models
35. Implementing classification models
36. Evaluating classification models
37. Introduction to TensorFlow and Keras Frameworks
38. Building Simple Neural Networks
39. Training Models for Classification Tasks
40. Applications and Case Studies

Review Questions:
Sr.No Questions TLO BL
1 (a) Install Scikit-learn and explore its core modules. 2 L3
(b) Write a Python script to load a dataset (e.g., Iris dataset) and display
its shape, features, and labels.
2 (a) Implement K-Means clustering on the Iris dataset. 3 L4
3 (a) Build a linear regression model on given dataset. 4 L4
4 (a) Predict and compare predicted vs. actual values with a scatter plot. 5 L4

5 (a) Train a Logistic Regression and Decision Tree classifier on the Iris 6 L4
dataset.
(b) Compare classification accuracy across models.
6 (a) Evaluate a classifier using confusion matrix, precision, recall, F1- 7,8 L4
score, and ROC-AUC
7 (a) Build a Multi-Layer Perceptron (MLP) in Keras for the MNIST 9 L4
dataset.
8 Complete an end-to-end ML/DL project: 10 L5
(a) Choose a dataset
(b) Preprocess data, build ML/DL models, evaluate results, and present
findings.

Page 14 of 15
MIT Vishwaprayag University, Solapur
School of Computing

Course Code and Title: SC2024 Python Programming and Applications


Chapter Number and Title: 6. Network Programming and Web APIs Planned Hours: 10 hrs
using Python

Learning Outcomes:
At the end of the topic student should be able to:
Sr.No TLO’s CO’s BL
1 Describe the basics of networked programs in Python. 6 L3

2 Use HTTP methods to send and receive data. 6 L3

3 Retrieve images and files over HTTP using Python. 6 L3

4 Access web pages with the urllib library. 6 L3

5 Implement applications using Web APIs in Python. 6 L3

Lesson Schedule:
Class No. Portion covered per session
41. Introduction to Networked Programs
42. Working with HTTP
43. Retrieving Images and Files over HTTP
44. Retrieving Web Pages with urllib
45. Application Programming Interfaces (APIs)

Review Questions:
Sr.No Questions TLO BL
1 Write a Python program to create a simple TCP client that connects to a 1 L3
server (e.g., google.com on port 80) and prints the connection status.
2 Use the requests library to send a GET request to https://www.example.com 2 L3
and print the status code, headers, and response text.
3 Write a Python program to download an image from a URL (e.g., a sample 3 L3
image link) and save it locally as sample.jpg
4 Use Python’s urllib to fetch the HTML content of a web page (e.g., 4 L3
https://www.python.org) and print the first 500 characters.
5 Write a Python program to call a public API (e.g., OpenWeatherMap or 5 L3
GitHub API) and display some data (e.g., current temperature or repository
details).

Page 15 of 15

You might also like