Module1 - PCAP 31 03 - Modules and Packages - Part 1
Module1 - PCAP 31 03 - Modules and Packages - Part 1
BY: IMRAN
Module 1: Modules in
• Contents
Python
•
Part 1: Introduction to Outcomes
Modules in Python • What is a module?
• Using a Module
• Importing a module
• CONTENTS • Working with standard modules
• Selected functions from the math module
• Outcomes
• Is there real randomness in computers?
• What is a module? • Selected functions from the random module
• Using a Module • How to know where you are?
• Importing a • Selected functions from the platform module
module • Python Module Index
• What is a package?
• Your first module
• Your first package
• OUTCOMES
• What is a module?
• Using a Module
• Importing a
module
print(sin(pi / 2))
• Note: as is a keyword.
• Example 2
• CONTENTS
• Outcomes from math import pi as PI, sin as sine
print(sine(PI/2))
• What is a module?
• Using a Module
• IMPORTING A
MODULE