FOC Milestone Roshan Documentation
FOC Milestone Roshan Documentation
Table of Contents
1. Introduc,on .........................................................................................................................................2
1.1. Technology used .......................................................................................................................................... 2
1.2. Aims and objec7ves .................................................................................................................................... 2
2. Introduc,on of Python .........................................................................................................................3
2.1. List in python ......................................................................................................................................... 3
2.2. String in python ......................................................................................................................................... 3
3. Descrip,on of code ...............................................................................................................................4
1
CS4051NT Fundamentals of Computing
1. Introduction
This is an assignment on developing a skin care shop management system using python. The
system is devised to make day-to-day operations of the skin care shop easier. Computerization is
essential for companies to be organized and competitive. The system is an efficient way to deal
with inventory, purchases by customers, as well as bills. The program uses relevant concepts of
Python including functions, file management, and input by the user to develop an efficient solution
for skincare shops to reduce errors and save time to better satisfy customers.
The project will be implemented using Python and will incorporate the following technologies: the primary
programming language for the project will be Python 3.x due to its ease of use and better performance in
file operations, string handling, and data structures. File I/O (Text Files): For reading and writing product
data and invoices. Data Structures (Lists, Dictionaries): For optimal management and storage of product
data, transactions, and stock information. The DateTime Module will be used to store dates of transactions
in every case.
2
CS4051NT Fundamentals of Computing
2. Introduction of Python
Python is an easy-to-use programming language especially for beginners to code. Guido van
Rossum came up with this language, and it was made publicly available in 1991. Python is heavily
used to develop websites,
analyze data, teach computers to learn, automate tasks, and more, simply because we can
It is marked by its simplicity and ease of use. A key feature of Python is its syntax, which is
readable and concise, making coding and understanding easy for programmers. In addition,
Python is
Python supports numerous paradigms for programming, including an easy stepwise method,
object-oriented programming, and functional programming. Python is also provided with an
extremely comprehensive range of useful libraries
Tools that make it even more effective and multifaceted.
List is a box in python with elements. Elements can be number, words or other lists. List are
Elements that are placed between square brackets [ ] are separated by commas. Here is an
example:
# A list of different kinds of items
my_list = [1, 2, 3, "watermelon", "grapes", 7,9]
print(my_list )
A string can be defined within the Python programming language as a series of characters placed
within single quotation marks (' ') or
Double quotation marks (“ ”) can be thought of as a group of characters including letters,
numerals, or symbols that an individual
are available for use. Strings are commonly used to hold names, messages, or other
In the realm of string manipulation, there is a whole range of things that can be done to strings;
some of these operations involve concatenating them, getting substrings, or altering them in some
way. As an example, given two strings "Hello" and "World," one can combine them to produce
"Hello World" using the + operator:
Example:
str4 = "Hello"
3
CS4051NT Fundamentals of Computing
str6 = "World"
result = str4+ " " + str
3. Description of code
This Python code facilitates processing of product information stored in a file(product.txt). It does
three tasks. First, read file () reads the file and converts the product information into a 2D list.
Second, write_file(data) uses the list and writes the altered data into the file. Third,
add_product_qty(data_in_2d_list) assists in adding quantity to a product by asking for the product
name and the quantity to add and updates the file with the new quantity. The main function
provides the user with the option of choosing whether to see the list of products or add product
quantity.