Ask coding questions

← Back to all posts
i dont know what im doing
isiaht111 (3)

Name: Wind-Chill Calculator

Points: 100

Important Notes

Format the output using the sample output in the Example Output section as a guide
A programming environment has been setup online
Connect to the server using an SSH client such as Bitvise (Windows users only - Apple users can access the server via the Terminal program)
Note: The Bitvise SSH client is pre-installed on School of Computing computers
IP Address: 139.62.210.180
Port: 22
Log onto the server
Note: The username and password values are case-sensitive.
Username: Your N# (i.e., n00123456)
Password: idc2000password
Students are required to change their password immediately after logging onto the server
Edit the project1.py file using the pico text editor
Note: Save your changes before exiting the pico editor or closing the SSH client.
Enter the command, pico project1.py
Run the program
Enter the command, ./project1.py
The textbook provides information about the Python language in a number of different sections
1.8 Data and Programming (pp. 57-63)
2.6 Programming Data Manipulation (pp. 108-116)
6.3 Procedural Units (pp. 280-287)
This website (Links to an external site.)provides introductory lessons and examples for Python
The lessons in the following categories will be helpful in completing Project 1
Introduction
Flow Control (Python if...else lesson only)
Functions (Python Function and Function Argument lessons only)
Function Requirements

Your program MUST utilize the following functions (included in the project file on the Linux server):

def calculateWindchill(temperature, windSpeed):
def convertTemperature(temperature):
def displayOutput(temperature, windSpeed, fWindChill, cWindChill):
def withinRange(value, min, max):
def main():
Function Descriptions

calculateWindChill
Accepts the temperature (in Fahrenheit) and wind speed values
Calculates the wind chill using the equation provided below
Returns the result of the wind chill calculation
convertTemperature
Accepts the wind chill temperature (in Fahrenheit)
Converts the temperature from Fahrenheit to Celsius using the equation provided below
Returns the result of the temperature conversion
displayOutput
Accepts the temperature, wind speed, wind chill (Fahrenheit) and wind chill (Celsius) values
Displays the values to the monitor (refer to the Example Output section)
The function does not return anything (no return statement is necessary)
withinRange
Accepts the user's input value, the minimum value of the valid range, and the maximum value of the valid range
Determines if the user's input value falls outside the specified valid range
If the user's input value is outside the valid range
Display an error message to the monitor (refer to the Example Output section)
Returns true if the user's input value is within the valid range; otherwise, false
main
Prompt the user for a temperature value (refer to the Example Output section)
Valid range is -58 to 41
Prompt the user for a wind speed value (refer to the Example Output section)
Valid range is 2 to 50
Test if temperature and wind speed values are within their respective ranges
If, and only if, both values are within range
Calculate the wind chill
Convert the wind chill result from Fahrenheit to Celsius
Display the results to the monitor
Program Logic

The program must use the functions provided above
DO NOT modify the provided functions
DO NOT create any additional functions
Display your name followed by a blank line
Prompt the user for 2 integer numbers (i.e., 0, 1, 2, …) and store the entered values in variables
Note: Display each prompt on a separate line.
Outside temperature (to)
Valid range: -58 to 41 (inclusive)
Wind speed (v)
Valid range: 2 to 50 (inclusive)
After the user enters the values (temperature and wind speed), test the input by calling the withinRange function for each value
Is the input within the valid range?
Note: Use the return value of the withinRange function.
If not, display the error message The entered value is out of range [x – y]
Note: x and y represent the minimum and maximum values of the valid range, respectively.

Note: If either of the input values (temperature or wind speed) are not within their valid range, after displaying the out of range error message, do not execute the remainder of the program (skip step 5).

If the user’s input values (temperature and wind speed) are both within their valid ranges
Call the calculateWindChill function and store the returned value in a third variable
Note: Use the exact code below to calculate the wind chill temperature using the Wind Chill equation.
windChill = 35.74 + 0.6215 temperature - 35.75 pow(windSpeed, 0.16) + 0.4275 temperature pow(windSpeed, 0.16)
Call the convertTemperature function and store the returned value in a fourth variable
Note: Use the exact code below to calculate the Celsius temperature using the Fahrenheit-to-Celsius equation.
celsius = (temperature - 32) * 5 / 9
Call the displayOutput function
Determine the minimum width of each column from the provided example
Display wind chill values (Fahrenheit and Celsius) to 3 decimal places

Answered by Edgod (58) [earned 5 cycles]
View Answer
Commentshotnewtop
Edgod (58)

Is this for a school/college assignment? What don't you understand about it?

isiaht111 (3)

It’s for college assignment I’m new to programming so I have no idea what to do all he gave us was the instructions above we can either do it on this site or our school server @Edgod

Edgod (58)

@isiaht111 That's tough. If you are new to programming, then I recommend these two websites:
https://www.w3schools.com/python/
https://www.tutorialspoint.com/python/
You might not have enough time to learn how to do the assignment in one day, but you shouldn't rush. Make sure you experiment with what you're learning. You could also see if anyone is available to collaborate and chat with you. Unfortunately, I don't have the time to teach you, but I hope the links above help you.