Assignment 2 - Assignment #:2 Due date: 6/10/2009 Name:...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment #:2 Due date: 6/10/2009 Name: Maria Bobadilla Problem #:1 a) False(0) b) false(0) c) true(1) d) true(1) e) false(0) f) false(0) g) true(1) Problem #: 2 a) flase(0) b) false(0) c) true(1) d) false(0) e) [1 1 0 0 0 1] f) [0 0 1 1 1 0] g) [2 -2 -1 0 2 -5] h) [2 2 -1 0 2 2]
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Assignment #: 2 Due date: 6/10/2009 Name: Maria Bobadilla Problem #: 3 Write a program that accepts the weight of a package in pounds and computes the cost of mailing the package Pseudo code/Approach: 1. Prompt the user for the weight of the package in pounds: weight=input(‘Enter the package’s weight in pounds’); 2. Read weight 3. Use if-elseif-else statement to define range of pounds and each range’s cost calculation: a) if weight <= 2, cost=15; b) else if weight >2 & c) else if weight >= 70 & d) if weight >= 100, (‘package is over weight’) 4. output= (‘ The cost of shipping cost = ‘) MATLAB code: (see attached) Results: Test weight = a) 1.8 lbs., b) 95 lbs., and c) 270 lbs. (see attached)
Background image of page 2
Assignment #: 4 Due date: 6/10/2009 Name: Maria Bobadilla Problem #: 4
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/15/2009 for the course MAE mae 205 taught by Professor Marayong during the Spring '09 term at CSU Long Beach.

Page1 / 5

Assignment 2 - Assignment #:2 Due date: 6/10/2009 Name:...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online