lab1 - assertEqual(CalcGrade(44.4 139.9 0.9215 def...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
from cisc106 import * def CalcGrade(lab,testscores): grade = (lab + testscores) / 200.0 return(grade) assertEqual(CalcGrade(47.2, 122.4), 0.848) assertEqual(CalcGrade(42.6, 142.5), 0.9255) assertEqual(CalcGrade(43.8, 141.1), 0.9245) assertEqual(CalcGrade(41.9, 148.5), 0.952)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: assertEqual(CalcGrade(44.4, 139.9), 0.9215) def TriangleArea(height, base): area = (height * base) / 2 return(area) assertEqual(TriangleArea(32.0,24.5), 392.0) assertEqual(TriangleArea(1.0,1.0), 0.5) assertEqual(TriangleArea(.001,3000.32),1.50016)...
View Full Document

This note was uploaded on 12/11/2011 for the course CISC 106 taught by Professor Mcgeary during the Fall '08 term at University of Delaware.

Ask a homework question - tutors are online