RAT 6.1 - PowerPoint PPT Presentation

About This Presentation
Title:

RAT 6.1

Description:

In 2-minutes, Individually, write a function file to compute the ... Within 30-seconds submit your papers to your GANT or Peer Teacher. Spring 2004. ENGR 111A ... – PowerPoint PPT presentation

Number of Views:24
Avg rating:3.0/5.0
Slides: 4
Provided by: DMa110
Category:
Tags: rat | gant

less

Transcript and Presenter's Notes

Title: RAT 6.1


1
RAT 6.1
  • Take out a piece of paper, write your name,
    team, todays date and RAT 6.1.
  • You are going to have to write a function file on
    paper. In the interest of time, you do not have
    to include any comments. For your homework,
    however, comments are REQUIRED!

2
RAT 6.1 (Continued)
  • In 2-minutes, Individually, write a function file
    to compute the area of a square given the
    dimension of a side. You will receive BONUS
    points if the function also outputs the
    perimeter. Test your algorithm using hand
    calculations for a square with side dimension of
    4.
  • Within 30-seconds submit your papers to your GANT
    or Peer Teacher.

3
RAT 6.1 Solution
  • function area_square, perimeter square(side)
  • function area_square, perimeter
    square(side)
  • This function computes the area and perimeter
    of a square.
  • INPUTS
  • side The length of one side of the square
    (units)
  • OUTPUTS
  • area_square The area of the square (square
    units)
  • perimeter The perimeter of the square
    (units)
  • This is the solution to RAT 6.1
  • S. Socolofsky
  • ENGR 111A 501-503
  • October 2004
Write a Comment
User Comments (0)
About PowerShow.com