Pure Programmer
Blue Matrix


Cluster Map

Project: Football Passer Rating (NFL)

In US football quarterbacks are rated on their performance based on a specific formula that combines statistics such as number of passing yards, number of touchdowns and number of interceptions. In the NFL the professional football passer rating formula is:






where

ATT
Number of passing attempts
COMP
Number of completions
YDS
Passing yards
TD
Touchdown passes
INT
Interceptions

Source: [[Passer Rating]]

The program should prompt the user for the five input values above and print the passer rating to one decimal place.

See: [[NFL Player Statistics]] for actual statistics that you can test with.

Output
$ python FootballPasserRating1.py Number of attempts: 497 Number of completions: 340 Number of touchdown passes: 33 Number of interceptions: 5 Number of passing yards: 4208 Passer rating: 112.3 $ python FootballPasserRating1.py Number of attempts: 531 Number of completions: 353 Number of touchdown passes: 27 Number of interceptions: 10 Number of passing yards: 3781 Passer rating: 96.3

Solution