Activity Summary
Modules are essential to any python developer. They enable you to “drop-in” additional functionality into your Python programs, drawing on a network of skilled module developers. In this training module, we’ll cover how to add additional functionality to a python program by importing the date-time python module.
Video
Activity Steps
Task: Write a Python program to display the current date and time.
- Create a new Python3 trinket
- Import the date-time module
- Adapt the broken trinket below (line 5 an 11) and print out current data and time by calling a variable that references the date time module. Ensure that all of the features work (hint: review the comments).
- Ensure that all of the features work (hint: review the comments).
- (Optional) Change the format of data and make it friendly for your users. Let us know in the comments how you have chosen to format the data
Code Example
Resources
These are the ones I use on in my own Python development: