forked from 0xfaust/NSA_COMP3321
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path07_01.py
28 lines (24 loc) · 956 Bytes
/
07_01.py
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
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
'''Lecture 07, Exercise 01
Write a Query class that has the following attributes:
- classification
- justification
- selector
Provide default values for each attribute (consider using None). Make it so
that when you print it, you can display all of the attributes and their values
nicely.
# your class definition here
Afterwards, something like this should work:
query1 = Query("TS//SI//REL_TO_USA,FVEY", "Primary email address of Zendian
diplomat", "[email protected]")
'''
class Query():
def __init__(self, mark=None, desc=None, email=None):
self.mark = mark
self.desc = desc
self.email = email
def __str__(self):
return "Mark {0} used for {1} associated with address: {2}.".format(self.mark, self.desc, self.email)
query1 = Query("TS//SI//REL_TO_USA, FVEY", "Primary email address of Zendian diplomat", "[email protected]")
print(query1)