Introduction to Python-BPPS Notes
Class Notes · Free · 50 pages · Basics of Python Programming for Pharmaceutical Sciences · Topic: Introduction to Python
Preview
Summary
These notes cover all of Unit I: Introduction to Python, written for first-year B.Pharm students who have never written a line of code. They start with computer basics, explained through the pharmacy counter, and what Python is. Next they cover installing Python and an IDE (Jupyter Notebook, PyCharm, VS Code) and why an IDE is better than a text editor. Then they explain variables and data types, type casting, and arithmetic, comparison and logical operators. Input and output operations and basic string operations come next. The unit ends with the standard and third-party libraries used in pharmacy. Every example can be run in the free Pharmakaksha Python Lab. The notes have diagrams, code panels with output, worked pharmacy programs, 30 MCQs with an answer key, 20 short-answer questions and 4 long-answer questions with answer plans.
Key points
- Computer basics and Python: The input → processing → output cycle explained through the pharmacy counter, memory vs storage, and what Python is and why it suits pharmacy students, with a first program in the free Pharmakaksha Python Lab.
- Installing Python and an IDE: Steps to install Python, what an IDE is, Jupyter Notebook, PyCharm, VS Code and Google Colab compared, and the advantages of an IDE over a plain text editor.
- Variables, data types and operators: int, float, str and bool, type casting, arithmetic, comparison and logical operators, and the order of operations remembered as BODMAS.
- Input, output and strings: print() and input() ("whatever you type into input() arrives as text"), string indexing, slicing and methods, with a dose-by-body-weight program as a worked example.
- Standard and third-party libraries: Built-in modules like math and random vs installed libraries like NumPy, Pandas and Matplotlib, and how to import and use them in pharmacy programs.
Log in or create a free account to read the full note. More in Notes and the Study Library.