Python Forum
Storm Hurricane Tracker (NEED HELP ASAP)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Storm Hurricane Tracker (NEED HELP ASAP)
#1
I need help with a hurricane tracker program I am working on that I think you guys might be able to help me with!
I can use help via skype if possible or any way you wish!

I have the image posted below, the rubric, and the python code I have for it.. I am confused on where to begin. I am an amateur in python but understand most of the terminology and syntax I just do not understand this project completely and could really use the help as I wish to do good on this project and get a good grade in school. Any help is appreciated.
 
Skype: zak.rowton

[Image: world_map.jpg]


Rubric: Rubric Download Link (PDF File)


def open_file():
filename = input("Input a file name: ") # Prompt for file name, open file, return file pointer
try:
fp = open(filename) # Opens filename if found and throws exception if not found
except FileNotFoundError:
print("Unable to open file. Please try again.")
fp = open_file()
except:
print("Error: Unknown, Please try again...")
return fp # Returns the file


def update_dictionary(dictionary, year, hurricane_name, data):
'''Remember to put a docstring here'''
pass


def create_dictionary():
'''Remember to put a docstring here'''
pass


def display_table(dictionary, year):
'''Remember to put a docstring here'''
pass
# print("{:^70s}".format("Peak Wind Speed for the Hurricanes in " + year))
# print("{:15s}{:>15s}{:>20s}{:>15s}".format("Name","Coordinates","Wind Speed (knots)","Date"))


def get_years(dictionary):
'''Remember to put a docstring here'''
pass


def prepare_plot(dictionary, year):
'''Remember to put a docstring here'''
pass
# create everything that is required for plotting
# return names, coordinates, max_speed


def main():
open_file()
'''Remember to put a docstring here'''
# print("Hurricane Record Software")
# print("Records from {:4s} to {:4s}".format(min_year, max_year))
# input("Enter the year to show hurricane data or 'quit': ")
# input("\nDo you want to plot? ")
# names, coordinates, max_speed = prepare_plot(dictionary, year)
# plot_map(year, size, names, coordinates)
# plot_wind_chart(year, size, names, max_speed)
# print("Error with the year key! Try another year")
pass


if __name__ == "__main__":
main()
File Contents for storm_track1.txt :
Reply
#2
You need to state clearly what you have tried, the output you get versus the output you expect and any error codes in their entirety. We are happy to help you, but we will not write the code for you. By the way, the code you posted has no indentation. Try using "Ctrl + Shift + v" when pasting between the code tags, this should maintain any indentation.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
If you are really struggling, you need to break this down into simple steps.

You have the basic bones of the programme (although it is hard to check the formatting is correct as it is not pasted in correctly and has lost indentation, which is CRITICAL in Python).

Assuming you have the first part like this:
def open_file():
    filename = input("Input a file name: ") # Prompt for file name, open file, return file pointer
    try:
        fp = open(filename) # Opens filename if found and throws exception if not found
    except FileNotFoundError:
        print("Unable to open file. Please try again.")
        fp = open_file()
    except:
        print("Error: Unknown, Please try again...")
    return fp # Returns the file
the file should open correctly.

Why not just write the code to output to the screen the file you have opened, just to make sure of that bit.

(Incidentally, calling the function open_file() from within itself, line 7, is called recursion and is probably not the right choice here. Would be better to have a loop that keeps going until a file has been opened.)
I am trying to help you, really, even if it doesn't always seem that way
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Could someone help me finish this ASAP JimmyDricks 7 2,245 Dec-23-2021, 10:30 AM
Last Post: Larz60+
  Need help with this homework for a course ASAP...need solution for completion. SP04123 8 4,964 Jun-21-2020, 06:15 PM
Last Post: buran
  really need assistance with this assignment ASAP due tomorrow mohamedhadi02 8 3,549 Jun-21-2020, 09:16 AM
Last Post: mohamedhadi02
  python homework help ASAP gk34332 1 2,974 Mar-13-2019, 07:27 PM
Last Post: ichabod801
  Temperature converter Help (ASAP) Edison_Weng 1 2,824 Apr-16-2018, 01:55 PM
Last Post: stranac
  Quiz Game Help (ASAP Please!) beginnercoder04 2 3,200 Apr-15-2018, 04:13 AM
Last Post: beginnercoder04

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020