159171 - computational thinking and software development


Computational Thinking and Software Development Assignment -

Question 1 - Random Sentence Generator

Write a program that reads in files of words and produces random but structurally correct English sentences, according to the syntax (rules of grammar) specified on the next page.

Question 2 - An Addressbook

Using a dictionary indexed by nickname (a short favourite name), write a simple address book that lets you save these contact details.

  • nickname (can be anything you like)
  • name
  • address
  • phone-no

Each dictionary entry contains a dictionary of the details of that person, so names['Tom'] # will return the dictionary that contains all of Tom's details,

The program first displays a menu (something like that shown below) and carries out the appropriate action depending on which letter the user types, and then redisplays the menu.

add - prompt separately for each of name, address, phone-no and nickname. Then save all of these fields into a data structure. A dictionary is recommended but a list will also work.

find - prompt for a nickname, then search for the name, address and phone number of the person with this nickname in your addressbook and display their details. Make the search is case-insensitive i.e. only the letters matter, not whether they're upper or lower case delete prompt for a nickname, then find and display the related entry. Ask the user if this is the correct one to be deleted. If they reply "yes" delete it.

list - all list all the entries, numbered sequentially. Display all the fields and format them for easy reading. Some possibilities are shown below.

IMPORTANT: make sure that you use functions, usually one for each of the commands. You can of course, create any additional functions that you think will help to simplify or clarify your code.

Problem 1 - Create a list of unique words

Write program to that lets you repeatedly enter a sentence and builds a list of unique words. After each sentence is entered, display the total unique words seen so far.

Problem 2 - Maintaining a bank account

The following five functions allow you to maintain the running balance of an account and print out lines relating to each transaction.

You'll also need a global variable (balance?) to maintain the running balance of the account.

Your task is to:

1. Complete the five (very short) functions by creating the code for the body of each function, and

2. Demonstrate that you code works by calling the functions, as is demonstrated.

Attachment:- Assignment Files.rar

Request for Solution File

Ask an Expert for Answer!!
Python Programming: 159171 - computational thinking and software development
Reference No:- TGS02798924

Expected delivery within 24 Hours