## Assignment 19 — function introduction

### Due March 20.

Not to be started before class 24.

### Module olio.py

• Complete the implementation of four functions. Program use_olio.py is available to help you test your module `olio` functions.

### Function `voting_age()`

• Does not take any parameters. Returns an integer indicating how old you need to be to vote. For example, the following code segment initializes both x and y to the integer `18`.

x = olio.voting_age()

y = olio.voting_age()

### Function `has_blanks( s )`

• Has one parameter `s`. Returns whether `s` contains at least one blank character; i.e., returns `True` if `s` contains a blank, and returns `False` otherwise. For example, the following code segment initializes `b1` and `b2` to `True` and `False` respectively.

x = 'CS 1112'

y = 'the_aarvark_said_arf_arf'

b1 = olio.has_blanks( x )

b2 = olio.has_blanks( y )

### Function `great_seal()`

• Does not have any parameters and does not return a value. The function prints text from the Great Seal of the United States, i.e., E Pluribus Unum.
• The code segment

olio.great_seal( )

print()

olio.great_seal( )

print()

produces as output

E Pluribus Unum

E Pluribus Unum

### Function `a_ing( n )`

• Has one parameter `n`. The function does not perform a return, instead it prints `n` lines of output. The first line prints a single `'a'`, the second line prints `'aa'`, the third line prints `'aaa'`, and so on. The string operator `*` should prove useful. For example usage, the code segment

olio.a_ing( 5 )

print()

olio.a_ing( 1 )

print()

olio.a_ing( 3 )

produces as output

a

aa

aaa

aaaa

aaaaa

a

a

aa

aaa