Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6690411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:38:01+00:00 2026-05-26T05:38:01+00:00

This has stumped me for several hours, and I am so close to the

  • 0

This has stumped me for several hours, and I am so close to the end, and I’ve tried several different variations, and it comes out in weird ways.

I have also found different times this problem has been asked, but none of them seem to be having the problem I seem to be having.

The question / problem:
I am having can be seen in the output below this code. The calculation is not carrying across the columns for each respective row, and the calculation keeps taking in the same values into the row and col, apparently, and keeps outputting the same value, 35.7

The code:

def WindChill():
row = 0
col = 0
i = 0
wchill = round((35.74 + 0.6215*(col) - 35.75*(row**16) + 0.4275*(col)*(row**16)), 1)

print(10 * " ", "|", end = "")

head = -1

for i in range(1):
    for col in range(-20, 70, 10):
        print(3 * " ", col, "F", 3 * " ", "|", end = " ")
    print("\n", 150 * "-")

while head < 0:
    for row in range(0, 55, 5):
        if (len(str(row))) < 2:
            print(row, "mph", 4 * " ", "|", end = " ")

        else:
            print(row, "mph", 3 * " ", "|", end = " ")

        print(3 * " ", round(wchill, 1), 3 * " ", "|", end = " ")

        col = 0
        head += 1

        print("\n", 150 * "-")
    print()

print()

This outputs:

                  |    -20 F     |     -10 F     |     0 F     |     10 F     |     20 F     |     30 F     |     40 F     |     50 F     |     60 F     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       0 mph      |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       5 mph      |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       10 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       15 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       20 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       25 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       30 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       35 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       40 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       45 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------
       50 mph     |     35.7     | 
       ------------------------------------------------------------------------------------------------------------------------------------------------------

Now, obviously, the 35.7 values are supposed to be different with each increment of 5 mph in wind speed, and it’s supposed to calculate values all across the columns for each row, too.

The table and calculations are supposed to look similar to the table at:
http://www.nws.noaa.gov/os/windchill/index.shtml

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T05:38:02+00:00Added an answer on May 26, 2026 at 5:38 am

    You have calculated wchill at the very beginning of your program, when row = 0 and col = 0. That number is evaluated to 35.7 at the beginning, and will not change.

    If you want wchill to change based on what row/column you are printing on currently, then you need to call the line

    wchill = round((35.74 + 0.6215*(col) - 35.75*(row**16) + 0.4275*(col)*(row**16)), 1)
    

    right before you print it, when the values of row and column change.

    edit: what I am trying to say here is that wchill isn’t magically changing by itself – you need to recalculate it every time the row/column changes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This has stumped me for some time. My problem: I have 2 different tables..
I'm not sure why this has stumped me. I have the following code $website
this is my first question. This has stumped me for 2 days. I have
This has me stumped. I'm trying to figure out how to save the state
This has stumped me for a few hours now, since I cannot see any
This one has stumped me. If you have two select tags (see this demo
This has me stumped. The follow code returns ,,,,,,: <script type=text/javascript> $(function() { $('#listB').sortable({
This one has me stumped. <div id=container> <div id=store></div> <div id=contact></div> </div> I'm looking
This one has me stumped. Here are the relative bits of code: public AgencyDetails(Guid
This one has me stumped. I need to call an activity method from within

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.