test - x x4 = int(raw_input("\nPlease enter a...

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

View Full Document Right Arrow Icon
# Author: Yeuan-Shyuan(James) Cheng # StudentID: 301001191 # CMPT 165 Assignment 3 # Jun 30, 2008 # print "Calculate the arithmetic mean and geometric mean of 5 numbers\n" p x1 = int(raw_input("Please enter a number: ")) x x2 = int(raw_input("\nPlease enter a number: ")) x x3 = int(raw_input("\nPlease enter a number: "))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: x x4 = int(raw_input("\nPlease enter a number: ")) x x5 = int(raw_input("\nPlease enter a number: ")) x aTotal=x1+x2+x3+x4+x5 a aMean = aTotal/5 a print "\nThe arithmetic mean is: " , aMean p gTotal = x1*x2*x3*x4*x5 g gMean = gTotal ** 0.2 g print "\nThe geometric mean is: " , gMean p...
View Full Document

Ask a homework question - tutors are online