File tree Expand file tree Collapse file tree
utilities/F1-Performance-Analyzer Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 print (f"\n 🏆 { 'Pos' :<4} | { 'Driver' :<20} | { 'Constructor' :<20} | { 'Points' :<6} " )
3737 print ("-" * 60 )
3838 for item in standings [:10 ]: # Top 10 Drivers
39- pos = item ['position' ]
40- driver = f"{ item ['Driver' ]['givenName' ]} { item ['Driver' ]['familyName' ]} "
41- team = item ['Constructors' ][0 ]['name' ]
42- points = item ['points' ]
43- print (f"{ pos :<4} | { driver :<20} | { team :<20} | { points :<6} " )
39+ rank_val = item ['position' ]
40+ driver_name = f"{ item ['Driver' ]['givenName' ]} { item ['Driver' ]['familyName' ]} "
41+ team_name = item ['Constructors' ][0 ]['name' ]
42+ score_points = item ['points' ]
43+ print (f"{ rank_val :<4} | { driver_name :<20} | { team_name :<20} | { score_points :<6} " )
4444 else :
4545 print (f"❌ Error fetching data: Status code { response .status } " )
4646 except Exception as e :
6060 print (f"\n 🏆 { 'Pos' :<4} | { 'Constructor' :<25} | { 'Nationality' :<15} | { 'Points' :<6} " )
6161 print ("-" * 60 )
6262 for item in standings :
63- pos = item ['position' ]
64- team = item ['Constructor' ]['name' ]
65- nat = item ['Constructor' ]['nationality' ]
66- points = item ['points' ]
67- print (f"{ pos :<4} | { team :<25} | { nat :<15} | { points :<6} " )
63+ rank_val = item ['position' ]
64+ team_name = item ['Constructor' ]['name' ]
65+ team_country = item ['Constructor' ]['nationality' ]
66+ score_points = item ['points' ]
67+ print (f"{ rank_val :<4} | { team_name :<25} | { team_country :<15} | { score_points :<6} " )
6868 else :
6969 print (f"❌ Error fetching data: Status code { response .status } " )
7070 except Exception as e :
You can’t perform that action at this time.
0 commit comments