Homework 3
The deadline is Friday, the 26th of November, 19:00 (Estonian time).
Exercise 1. Birthdays
Modify the birthdays program : the program should output top 5 months that have the most birthdays.
Exercise 2. Distances between points
Write a function coordinates that has one argument - point_name. The function has to prompt the user for x and y coordinates of the point and return the coordinates in a tuple.
Write a function distance that takes four coordinates (two coordinates for each point) as its arguments and returns the distance between two points. Hint:
Write a program that asks the user for the coordinates of three points (A, B, C) using function coordinates, finds out and outputs two points that are the closest to each other (use function distance) (you can assume that all distances are different).
Here is an example of the program output:
Please enter point A x coordinate: 0 Please enter point A y coordinate: 0 Please enter point B x coordinate: 3 Please enter point B y coordinate: 2 Please enter point C x coordinate: 8 Please enter point C y coordinate: 9 Points A and B are the closest to each other.
Go to Moodle and upload your solution into Homework 3.