lsanalysis

lsanalysis - #======================================...

This preview shows pages 1–3. Sign up to view the full content.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #====================================== # Assignment 3 # Name: Yeuan-Shyuan(James) Cheng # StudentID: 301001191 #====================================== # #calculate the size of image and graph #how big should the graph magnify def size(minx, maxx): size = 1; if maxx-minx < 11: size = size * 50 elif 10 < maxx-minx < 16: size = size * 30 elif 15 < maxx-minx < 21: size = size * 20 elif 20 < maxx-minx < 51: size = size * 10 elif 50< maxx-minx < 101: size = size * 5 else: size = size return size def fit(rsq): s="" if rsq>0.8: s="good fit" else: s="not a good fit" return s import cgi, Image, ImageDraw, ImageFont i form = cgi.FieldStorage() f #html header print """Content-type: text/html p <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Least Square Analysis</title> <link rel="stylesheet" href="hw3style.css" type="text/css" /> </head> <body> """ " print " <h1>Least Square Analysis</h1>" print " <p> Here is the list of input you specified: </p>" p #testing input ''' x1 = 40.5 x2 = 38.6 x3 = 37.9 x4 = 36.2 x5 = 35.1x5 = 35....
View Full Document

{[ snackBarMessage ]}

Page1 / 4

lsanalysis - #======================================...

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

View Full Document
Ask a homework question - tutors are online