You are on page 1of 1

Assignment 2

Fundamentals of Programming
PROG 8490

Semester: Winter 2022 Assignment Type: Individual, Open Book


Issue Date: Total Marks: 100
Due Date: Marks weightage:

Instructions:

1-) Complete each question in Jupyter notebook in the Assignment 2 submission box by the due date
(Save your code file in Jupyter notebook and upload the saved file )
2-) If there is any question that requires you to explain, you can do so in Python by simply typing in the
code editor as a comment.
3-) This is an individual assignment. You can take help from your lectures, textbook, internet, and class
notes, etc. but straight copy-paste of code from external sources is strictly prohibited.
4-) All questions are mandatory and carry equal marks.

Exercise:
Using dataset flights from nycflights13 and pandas package functions complete the following questions,

Question 1: Find all flights that(33 marks)


1. Had an arrival delay of two or more hours
2. Flew to Houston (IAH or HOU)
3. Were operated by United, American, or Delta
4. Departed in summer (July, August, and September)
5. Arrived more than two hours late, but didn’t leave late

Question 2
1. Sort flights to find the most delayed flights (arrival delays) .
2. Which flights travelled the farthest? Which travelled the shortest? Answer by sorting the flights
dataset is descending order of flight distance.

Question 3
1. Create a new variable and call it Computed_Speed. This new variable will show flight speed in
distance/minute unit.

You might also like