Alice Community  

Go Back   Alice Community > Alice 2 > Works-In-Progress

Reply
 
Thread Tools Display Modes
Need some help with the last part of this program.
Old
the noise
Guest
 
Status:
Posts: n/a
Default Need some help with the last part of this program. - 11-01-2005, 12:07 PM

Hello, i am new to using Alice, just really started programming in this other than that i have had a little bit of VisualBasic. Anyway I don't know i this is the right place ot post but onto the qustion. I am working on a program in alice that converts temperatures from fahrenheit to celsius and does other stuff when the temperatures are at a certain degree. The last step to the project is I have to have all the temperatures average in both degrees celsius and degrees fahrenheit and then tell how far the maximum and minimum temperatures inputted are from the average. If any of you could take a look at it and help me out, i would greatly appreciate it. Thanks in advance.
Attached Files
File Type: zip my first alice poject.zip (1.06 MB, 671 views)
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 11-01-2005, 12:40 PM

have you learned about lists yet?
   
Reply With Quote
Old
the noise
Guest
 
Status:
Posts: n/a
Default 11-01-2005, 12:45 PM

no, i tried messing around with that and i e-mailed my teacher about it and told her i tried to do it with lists but i couldnt figure it out, she said it could be done with a variable initialized to zero to keep track of it, but honestly i have no idea what to do with that
   
Reply With Quote
Old
gabe
Administrator
 
gabe's Avatar
 
Status: Offline
Posts: 461
Join Date: Jul 2005
Location: Pittsburgh, PA
Default 11-01-2005, 01:11 PM

So, you'll want three separate variables.

One will be to keep a sum of all the temperatures. To do this, every time the user inputs another temperature, you'll want the variable to be equal to itself plus the new temperature. From there, you can find the average temperature in C and F.

The other two variables will keep track of the lowest temperature and the highest temperature that the user inputs. You'll want to set both of them to the first temperature, and subsequent time the user inputs another temperature, check to see if it's lower than the lowest; if so, make it the new low variable value. If it is not lower than the lowest, check if it's higher than the highest, etc.

Take it from there!
   
Reply With Quote
Old
the noise
Guest
 
Status:
Posts: n/a
Default 11-01-2005, 01:14 PM

thanks
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.