CS 111: Introduction to Computer Science

Winter 2017

HW05: Menu-driven string functions

Due: Monday, 01/23 at 22:00

If you are pair programming, do NOT start coding without your partner. You should read the assignment first, feel free to think about it, but do not actually start coding.

Your task

For this assignment, you'll get the opportunity to apply your knowledge of loops, conditionals, and functions to create a small menu-driven program that will enable your user to play with strings. You may wish to use some of Python string methods.

When a person executes your program, your program should ask the person to enter a string. Next, the following menu should appear:

A. How many characters are in the string? B. How many letters are in the string? C. How many vowels are in the string? D. Is the string a palindrome? E. What is the Caesar Cipher (shift 3) of the string? Q. Quit Your choice:

Once the person makes a choice, the program should perform the requested task. If the person chooses Q, then the program should terminate. Otherwise, the process should continue: ask the user for another string, print the menu, get a choice, etc.

A little help

Optional extensions

Grading

Please name your file menu.py. This makes it a little easier for the grader.

Start early, have fun, and discuss questions on Moodle.