-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathdefining_functions.py
More file actions
33 lines (23 loc) · 924 Bytes
/
defining_functions.py
File metadata and controls
33 lines (23 loc) · 924 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""
This script is used for course notes.
Author: Erick Marin
Date: 10/08/2020
"""
def greeting(name, department):
""" Print out a greeting with provided `name` and department
parameters. """
print("Welcome, " + name)
print("Your are part of " + department)
# Flesh out the body of the print_seconds function so that it prints the total
# amount of seconds given the hours, minutes, and seconds function parameters.
# Remember that there are 3600 seconds in an hour and 60 seconds in a minute.
def print_seconds(hours, minutes, seconds):
""" Prints the total amount of seconds given the hours, minutes,
and seconds function parameters. Note: There are 3600
seconds in an hour and 60 seconds in a minute. """
print((hours * 3600) + (minutes * 60) + seconds)
greeting("Blake", "IT Department")
print("\n")
greeting("Ellis", "Software Engineering")
print("\n")
print_seconds(1, 2, 3)