Basics of Python Programming for Pharmaceutical Sciences

[ Bpharm (Bachelor of Pharmacy) ]

Under Class: | 1st Semester (Bpharm) |

Basics of Python Programming for Pharmaceutical Sciences - Question Papers, Lecture Notes, Study Material Download PDF

Pharmacy - Bachelor of Pharmacy (Bpharm) - 1st Semester - 1st Year - Name of Subject: Basics of Python Programming for Pharmaceutical Sciences - BP101T - Lecture Notes, Study Material, Question Papers Download PDF




UNIT I : Data Expressions Statements:


• Introduction to Python
• Python interpreter
• Modes of Python Interpreter
• Values and Data Types
• Variables - Python
• Keywords - Python
• Identifiers - Python
• Statements and Expressions - Python
• Input and Output - Python
• Comments - Python
• Docstring - Python
• Lines and Indentation - Python
• Quotation in Python
• Tuple Assignment - Python
• Operators and Types of Operators - Python
• Operator Precedence - Python
• Functions - Python
• Types of function
• Function definition(Sub program) - Python
• Flow of Execution - Python
• Function Prototypes
• Parameters and Arguments - Python
• Modules - Python
• Python Programs - Data, Expressions, Statements
• Python Data, Expressions, Statements: short important questions and answers
• Python Data, Expressions, Statements: brief important questions and answers

UNIT II : Control Flow Functions:


• Boolean Values
• Conditionals - Python
• Iteration/Control Statements - Python
• Fruitful Function - Python
• Strings - Python
• List as array - Python
• Example Python Programs: Control Flow, Functions
• Python Control Flow, Functions: short important questions and answers
• Python Control Flow, Functions: brief important questions and answers

UNIT IIIa : Lists Tuples Dictionaries:


• Lists - Python
• Tuple - Python
• Dictionaries - Python
• Difference between List, Tuples and dictionary
• Advanced list processing - Python
• Python Programs on matrix
• Python Programs on Lists, Tuples, Dictionaries
• Python Lists, Tuples, Dictionaries: short important questions and answers
• Python Lists, Tuples, Dictionaries: brief important questions and answers

UNIT I : Data Expressions Statements:


• What is a program?
• Python programming language
• Values and types - Python
• Expressions and statements - Python
• Python Tuple
• Python Strings
• Comments - Python
• Python Output Using print() function
• Modules - Python
• Python Import
• Operators and operands
• Type of operators in Python
• Functions - Python
• Flow of execution - Python
• Parameters and arguments - Python
• Python Basic Programs

UNIT II : Control Flow Functions:


• Conditionals - Python
• Recursion - Python
• Iteration - Python
• Fruitful Functions - Python
• Strings - Python
• Example Python Programs on Control Flow, Functions

UNIT IIIa : Lists Tuples Dictionaries:


• Lists - Python
• Tuples - Python
• Python dictionary
• Python Advanced list processing
• Example Python Programs on Lists, Tuples, Dictionaries

UNIT IIIb : Files Modules Packages:


• Files - Python
• Exception - Python
• Modules - Python
• Package - Python
• Python Files, Modules, Packages: short important questions and answers
• Example Python Programs on Files, Modules, Packages







BP101T : Basics of Python Programming for Pharmaceutical Sciences (Theory) core

 

Course Objectives:

The objectives of this course are to:

1. Introduce the fundamentals of Python programming for pharmaceutical sciences.

2. Develop basic programming skills using control structures, functions, and data structures.

3. Provide knowledge of data handling techniques for structured dataset management.

4. Familiarize students with data analysis tools such as NumPy and Pandas for healthcare datasets.

5. Enable students to visualize and interpret pharmaceutical data.

 

Course Outcomes (CO):

Upon successful completion of this course, the students will be able to:

1. Explain the fundamentals of Python programming, including variables, data types, operators, and libraries.

2. Analyze program logic using control structures and functions.

3. Organize, manipulate, and retrieve data using data structures and file handling techniques.

4. Analyze pharmaceutical datasets using Python libraries.

5. Visualize and interpret pharmaceutical data using graphical tools.

 

Detailed Syllabus:

 

Unit I 

Introduction to Python programming

 • Installing Python and an Integrated Development Environment (IDE) [Jupyter Notebook, PyCharm, VS Code etc.], Advantages of IDEs over text editors.

 • Python variables and data types (integers, floats, strings, booleans), Type casting and basic operators (arithmetic, comparison, logical), Input and output operations.

 • Basic string operations and manipulation techniques. Introduction to standard libraries and third-party libraries, installing and uninstalling libraries.

 

Unit II

Control Structures & Functions

 • Conditional statements (if, if-else, if-elif-else), nested conditions

 • Loops (for loop, while loop).

 • Break and continue statements.

 • Defining and calling functions, passing arguments and returning values.

 • Writing modular programs for simple pharmaceutical applications- dosage calculation and BMI calculation.

 

Unit III 

Data Structures & File Handling

 • Lists, tuples, and dictionaries.

 • Indexing and slicing lists, basic operations on lists and dictionaries, string manipulation techniques.

 • Introduction to NumPy arrays, basic operations using NumPy (array creation, arithmetic operations).

 • Reading and writing CSV files.

 • Understanding structured healthcare datasets.

 • Importing small pharmaceutical datasets and performing basic data access and manipulation tasks.

 

Unit IV

Data Handling with Pandas

 • Introduction to Pandas library.

 • Pandas Series and DataFrame structures.

 • Reading CSV and Excel files-PK study datasets and ADR reports

 • Inspecting datasets using functions such as head(), tail(), info(), and describe().

 • Data cleaning techniques and handling missing values.

 • Filtering and selecting data based on conditions.

 • Grouping data and performing aggregation functions.

 

Unit V

Data Visualization with Matplotlib

 • Introduction to Matplotlib.

 • Creating line plots, histograms, scatter plots, and box plots.

 • Labeling axes, titles, and legends.

 • Create plots and visualize pharmaceutical datasets - concentration-time curves for oral and IV administration, ADR reporting rates across drugs, dissolution profiles.

 • Scientific interpretation of plots.

 

Recommended References (Preferably Latest Editions):

 

1. Weiss, C.J., 2017. Scientific Computing for Chemists with Python. Available at: 

https://weisscharlesj.github.io/SciCompforChemists/notebooks/introduction/intro.ht ml

2. Perkovic, L., 2015. Introduction to Computing Using Python: An Application Development Focus. 2nd ed. Hoboken: Wiley.

3. Sweigart, A., 2025. Automate the Boring Stuff with Python. 3rd ed. Available at: https://automatetheboringstuff.com/

4. W3Schools, n.d. Python Tutorial. Available at: https://www.w3schools.com/python/

5. Datasets for Education and Research:

Mentors and students can access healthcare datasets from sources such as Kaggle (healthcare records), government agencies (healthdata.gov, WHO, https://www.data.gov.in/), and clinical trial registries (https://ctri.nic.in/,

https://clinicaltrials.gov/). Always use data responsibly.