Exemplo n.º 1
0
"""
PEP: 8
Title: my_definitions_driver
Author: Kevin Cook
Status: Active
Type: Process
Created: 26-October-2020
Post: 26-October-2020
History:
"""
import my_definitions as defs

if __name__ == '__main__':
    defs.greeting()
    defs.author()
    d = {1: "A", 2: "B", 3: "C"}
    defs.print_dict(d)
    s = set(["C", "B", "A"])
    defs.print_set(s)
Exemplo n.º 2
0
"""
calls the functions from my_definitions.py and provides the dictionary and set lists
"""

import my_definitions

name_dict = {'Sara': 34, 'Janet': 80, 'Daniel': 65, 'Amy': 55}

name_set = {'Ankeny', 'Johnston', 'Des Moines', 'Grimes', 'Altoona'}

if __name__ == '__main__':
    my_definitions.greeting('Jan')

    my_definitions.message('Lisa Kilmer')

    my_definitions.print_dict(name_dict)

    my_definitions.print_set(name_set)
Exemplo n.º 3
0
import my_definitions as md

# imports and uses module

if __name__ == '__main__':
    hockey_dict = {
        'Capitals': 'Cool',
        'Avalanche': 'Cool',
        'Blues': 'Cool',
        'Penguins': 'Not Cool'
    }

    hockey_set = ('Capitals', 'Avalanche', 'Blues', 'Penguins')

    md.greeting()
    md.author('Bob')
    md.print_dict(hockey_dict)
    md.print_set(hockey_set)
Exemplo n.º 4
0
import my_definitions as my

if __name__ == '__main__':
    my.greeting()
    my.author("Michael Moore")
    my.print_dict({"A": 50, "B": 40, "C": 80})
    my.print_set({1, 2, 3, 4, 4, 45, "hello"})
Exemplo n.º 5
0
"""
Program: my_definitions_test.py
Author: Kelly Klein
Last date modified: 7/1/2020
This program will test the modules written by me
"""

from my_definitions import greeting
from my_definitions import me_as_author
from my_definitions import print_dict
from my_definitions import print_set

if __name__ == '__main__':

    greeting()
    me_as_author()
    print_dict()
    new_dict = {
        'Slayer': 'Reign In Blood',
        'Green Day': 'Dookie',
        'Direct Hit!': 'Crown of Nothing',
        'Strapping Young Lad': 'Heavy as a Really Heavy Thing'
    }
    print_dict(new_dict)
    print_set()
    even_set = {2, 4, 6, 8, 10, 12}
    print_set(even_set)
Exemplo n.º 6
0
#!/usr/bin/python3
import my_definitions as me

me.print_dict({'a': 5, 'b': 4})
me.print_set(('hello', 'world', 5))