CPSC120
Fundamentals of Computer Science

Activity 6

Project

Mock-up

Use the graphics module to create a program that draws the user interface for a recipe app like the following:

recipe

The drawing should:

  1. center the title on screen.

  2. center the image on the screen.

  3. fill the height of the screen. When the screen is resized, the drawing should resize:

recipe small

You can use any image you want, with any title you wish.

Challenge

Add review information to the bottom of the image. The stars should be left-justified, and the review count should be right-justified with the image. You can draw the stars by drawing text that contains stars: “★★★★”

recipe review

Create a program that navigates a car around some obstacles using the robotics module.

Create a program that adds the following to the 3D world:

  1. gound
  2. car
  3. a green cube
  4. assorted boxes between the car and the cube

Then modify the program so that the car drives to the green cube avoiding the obstacles.

Example


CSV

Create a program that uses the spreadsheet module to print the data in a CSV file.

  1. Create a CSV file, either using a text editor or a spreadsheet program. You can put whatever made-up data you want into it, but it should have three attributes and three records.

  2. Upload your CSV file and create a Python program that uses the spreadsheet module to print data from the CSV file you uploaded. The program should print the rows of the dataset labeled.

Example

Header: Name, Age, Occupation

Row 1: Arya, 14, Assasin

Row 2: Jon, 17, Lord Commander

Row 3: Duncan, 20, Hedge Knight