Posts

Showing posts from June, 2023

Module 6 Assignment

Image
  In this updated version, I've added the `datetime` module to retrieve the current time. The current time is then formatted using the %Y-%m-%d %H:%M:%S format, which represents the year, month, day, hour, minute, and second. However, I encountered a bug while trying to run my revised code. This was for the first segment. For the second segment, the original was almost unchanged and very simillar, however the timedelta allowed us to print the current time while subtracting 60 seconds. In the third segment `days` represents the number of days in the timedelta (100), `seconds` represents the number of seconds remaining after removing the days (37,380 seconds = 10 hours * 3600 seconds + 13 minutes * 60 seconds) Last but not least, the `datetime.now()` function shows us the current date and time. The` variable stores the result, and it is printed to the console

Module 5 Assignment

Image
  Module 5 Assignment Explanation: This code is a rectangle with width and height attributes. The create_rectangle function creates a new rectangle with our parameters . The str_rectangle function changes a rectangle into a string representation. The shift rectangle function edits the coordinates of a rectangle, while the offset function creates a new rectangle instance offset from the given instance. The test code creates and changes rectangles based on the desired input and output.

Module 4 Assignment Trey Lopez

Image
 Module 4 Assignment : Roots & Reciprocals

Module 3 Assignment

Image
 Section: Name Function & Full Names Section: Addition & Return Calculator  Section: List of Numbers & Tuple  Here is my assignment for Module 3!