CT320: Network and System Administration

Fall 2019

IQ 13

CT320 IQ 13

Show Main.IQ13 as a slide show.

Version

Which version of Python did we discuss?

  1. Python 1
  2. Python 2
  3. Python 3
  4. Python 4
  5. Python 5
  6. Perl 6

Types

Which one of these aggregate types can only hold values of the same type?

  1. list
  2. tuple
  3. set
  4. dictionary
  5. none of the above

List

print(type((1,2,3)));
<class 'tuple'>
print(type([4,5,6]));
<class 'list'>
print(type({7,8,9}));
<class 'set'>
print(type(<10,11,12>));
  File ".py3", line 1
    print(type(<10,11,12>));
               ^
SyntaxError: invalid syntax

Which of these is a list?

  1. (1,2,3)
  2. [4,5,6]
  3. {7,8,9}
  4. <10,11,12>

String matching

print("C.*a" in "Chihuahua")
False
  1. True
  2. False
  3. 0
  4. "Chihuahua"
  5. It won’t compile.

in does simple string matching, not regular expressions

Substrings

What will this code display?

s="abcde"
s[3] = '123'
print(len(s))
Traceback (most recent call last):
  File ".py3", line 2, in <module>
    s[3] = '123'
TypeError: 'str' object does not support item assignment
  1. 3
  2. 5
  3. 7
  4. 8
  5. It won’t compile.

strings are immutable

print

How many lines will this display?

print('alpha')
print('beta', 'gamma')
print('delta\n')
alpha
beta gamma
delta

  1. 2
  2. 3
  3. 4
  4. 5
  5. It won’t compile.

sendmail

sendmail is an:

  1. MDA
  2. MRA
  3. MSA
  4. MTA
  5. MUA

CT320: Networking, Sys Admin, and Art History

Who painted the postman in the previous question?

  1. Andy Warhol
  2. Leonardo da Vinci
  3. Pablo Picasso
  4. Rembrandt
  5. Vincent van Gogh

MUA

Which one of these is an MUA?

  1. gmail
  2. imapd
  3. MIME
  4. sendmail
  5. thunderbird

SMTP Port

egrep ' (22|25|80|465|587)/tcp' /etc/services
ssh             22/tcp                          # The Secure Shell (SSH) Protocol
smtp            25/tcp          mail
http            80/tcp          www www-http    # WorldWideWeb HTTP
submission      587/tcp         msa             # mail message submission
urd             465/tcp         smtps   # URL Rendesvous Directory for SSM / SMTP over SSL (TLS)

SMTP occurs on port:

  1. 22 ssh               
  2. 25 smtp              
  3. 80 http              
  4. 465 old port for smtps
  5. 587 mail submission   

Memorization

Should I memorize port numbers?

  1. Certainly not.
  2. Probably not.
  3. Well, maybe.
  4. I know them all!
  5. Probably not, but you should know a few really well-known port numbers.

Mail Handling Record

Which DNS record indicates a host that handles mail?

  1. A
  2. AAAA
  3. CNAME
  4. MH
  5. MX