Assignment questions
Assignment questions
Write a program using the openpyxlmodule to create a bar chart representing total
sales for each product category and save the updated workbook as
sales_chart.xlsx.
2. Develop a program divisionTable.py that takes a number N from the command line
and generates an N×N division table (where each cell contains the result of dividing row
number by column number) in an Excel spreadsheet.
3. Outline a python program to count occurrences of characters in a string and print the
count
4. Develop a dictionary of people with their birthday, display birthdate for a person if his
name in the dictionary otherwise add that person name to existing dictionary.
5. Imagine you're managing an online store, and each product has a unique code like
"P23ELEC150", where:
a. P23 indicates the product series.
b. ELEC specifies the category (Electronics).
c. 150 represents the product ID.
Develop a program to:
1. Print each character of the product code individually.
2. Extract and display the series, category, and product ID.
6. Develop a program to sort the contents of a text file and write the sorted contents into a
separate text file.
7. A company stores sales data in an Excel file. Develop a program how you would read
and process the data to calculate total sales using the openpyxl module
8. You are working with a CSV file containing customer feedback data. The file uses a pipe
(|) as the delimiter instead of a comma, and each row ends with a semicolon (;) instead of
the usual newline character. Your task is to illustrate how to read this file and convert it
into a standard CSV format using Delimiter and Line terminator keyword.
9. You are working as a data analyst for a company that processes large datasets received
from various vendors. These datasets are in CSV format, and each file contains a header
row that describes the columns. However, the company’s proprietary data processing
software cannot handle files with headers, Develop a python program to remove the
header in all the files for the further process in a company.
10.Develop a program multiplicationTable.py that takes a number N from the command line and
creates an N×N multiplication table in an Excel spreadsheet. Imagine a Class Rectangle
with instance attributes width and height. This class should contain another attribute
“corner” which is an instance of another class called as Point. The Point class should
have attributes:
a. x: The x-coordinate of the corner.