
Concept explainers
I have to create a program file using python. I have created another program that would correlate with this code. I don't where to start. I will attach my program and the instructions.
- Create a file that has the data for at least five points. You can use notepad to make your file.
- Each line in the file should have each point’s lat and lon coordinates and a description. It could look like this:
100.200, 123.456, Main Campus
120.33, 142.345, Montoya
153.23, 322.345, Rio Rancho
133.23, 143.345, STEMULUS Center
153.42, 122.345, ATC
(Note: The “Points.txt” file attached to the assignment can be used instead of creating your own file.)
- In the main part of your program do the following:
- Create a list that you will use to collect the points. Something like pointsList = [].
- Read points in from a file.
- As you read lat lon and description from the file, use those values to create a point and add that point to a List. Something like:
newPoint = GeoPoint(lat, lon, description)
pointsList.append(newPoint)
- Inside the “Do another (y/n)?” loop do the following:
- Ask the user for their location.
- Create a point to represent the user’s location.
- Iterate through the point list and find the closest point.
- Tell the user which point they are closest to in this format:
You are closest to <description> which is located at <point’s lat, lon coordinates>
- Ask “Do another (y/n)?” and loop if they respond with ‘y’


Trending nowThis is a popular solution!
Step by stepSolved in 5 steps with 4 images

I'm getting an error 'GeoPoint' not defined when I run the code.
I'm getting an error 'GeoPoint' not defined when I run the code.
- Using JAVA OOP, needs to work on the eclipse IDE The international Olympics Committee has asked you to write a program to process their data and determine the medal winners for the pairs figure skating. You will be given a file named Pairs.txt.This file contains the data for each pair of skaters. The data consists of each skater’s name, their country and the score from each of eight judges on the technical aspects and on the performance aspects. A typical record in the file would be as follows: SmithJonesAustralia5.0 4.9 5.1 5.2 5.0 5.1 5.2 4.84.3 4.7 4.8 4.9 4.6 4.8 4.9 4.5 LennonMurrayEngland2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.83.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8GustoPetitotItalia4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.85.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8LahaiePetitFrance1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.85.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8BilodeauBernardCanada2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.84.1 4.2 4.3 4.8 4.9 4.6 4.0 4.5LahorePedroMexico3.2 3.1 3.8 3.9 3.0 3.6 3.9 3.35.9 5.8 5.8 5.8 5.9 5.6 5.0…arrow_forwardThis is a one question problem with multiple parts (part (a) to (e), please help with every part. Use matlab for the code. Goal: The intent of this problem is to have you visualize electric fields and understand spatial relationships between charge distributions and E. Instructions: Combine all parts of the problem into a single file and upload either a .pdf or image file of all parts of the question. 1. Develop a code that can plot the electric field produced by two point charges separated by a distance d where the origin is in the middle of the two charges. You may use whatever language is most convenient for you. (a) Produce a plot of the electric field produced by a dipole (equal and opposite point charges) (b) Produce a plot of the electric field of two identical point charges (c) Produce a plot of two charges with random charge values (keep them reasonably close in magnitude) (d) Discuss the electric field distributions for the three cases above. Take note of where the…arrow_forwardCannot figure out how to code this. Please helparrow_forward
- in python. I have a simple question. Why is file design important? Why is important to know how the data in your text file is arranged?arrow_forwardFor this lab you will do 2 things: Solve the problem using pseudocode Code it in Python When you are finished, submit both your pseudocode and your program code. Use MS Word to write your pseudocode, paying attention to comments and the indentation of code blocks. When done, save the file as a PDF. Your source code, written using Python, will produce a *.py file. Upload both the *.pdf and the *.py file (at the same time). Bank Charges A bank charges $10 per month plus the following check fees for a commercial checking account: $.10 each for less than 20 checks $.08 each for 20 - 39 checks $.06 each for 40 - 59 checks $.04 each for 60 or more checks Write a program that prompts the user for the number of checks written for a month, then compute and display the bank's total service fees for the month. Make sure the output displays with a $ and 2 decimal…arrow_forwardPlease help with this python problem, I am confuse don how to go about it.arrow_forward
- I have an idea and would appreciate some help. Here is my idea: What is my program supposed to do: . I want to be able to create a program that can extract a player's name based on the sport I decide to choose (either football, basketball, or baseball) and have them be placed on the user's team where they can choose to keep them or remove them from said team. As the season progresses the user will go into the program and input the stats of their players and the program will calculate their fantasy performance based on what the user inputs. The user may also be able to put in, take out, or adjust any stats that are calculated at any time during the season. The user will also take the players and be able to choose from a number of options on what to do with them. I hope to either make it so that multiple users can "play" at the same time against one another with the program, if not then I may try to input at least one other team controlled by the program so that there would be some…arrow_forwardHi, I need to solve this problem with C++ programming language using Visual Studio. Thank you.arrow_forwardNeed help with writing the program creating two different class files (Instruction are attatched in the images). Please provide with ss of your code if possible.arrow_forward
- Python Soulution to 1arrow_forwardDesign a modular program in Python to process payroll for all hourly paid employees, save all the data into a text file and make a backup file as well. The program should allow user enter each employee's ID, name, hours worked, and hourly pay rate. And then calculate gross pay with overtime hours(hours beyond 40) paid 50% more. And then the program should display pay statement for each employee and store them into a same text file. The program should display total number of employees, total number of hours worked by all employees, and total gross pay and save them at the end of the same text file as well. The program should contain the following functions: main(), get_employee_info(), calc_gross_pay(hours, rate), display_pay_statement(emp_id, emp_name, hours_horked, hourly_pay_rate, gross_pay), save_pay_statement_to_file(file_object, emp_id, emp_name, hours_worked, hourly_pay_rate, gross_pay), save_summary_to_file(file_object, number_of_employees, total_hours_worked, total_gross_pay).…arrow_forwardNeed to do this in language as a while little confused on how to do it?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





