A college team\'s BCS football ranking is comprised of three elements:1) the Har
ID: 3751415 • Letter: A
Question
A college team's BCS football ranking is comprised of three elements:1) the Harris Poll score, 2) the Coaches Poll score, and 3) a computer ranking. Each of these counts as one-third of the final BCS ranking. The Harris Poll score is obtained by dividing the Harris Poll ranking by 2,850, which is the max- imum number of points any team can receive if all 114 voting members rank the same team as number 1 The Coaches Poll score is obtained by dividing the Coaches Poll ranking by 1,475, which is the maximum number of points any team can receive if all 59 voting members rank the same team as number 1 The computer ranking is calculated by some magical formula that won't concern us. We do know, however, that it falls between 0 and 1 Write a program to calculate BCS scores for college football teams. Prompt a user for a team's Harris Poll ranking (an integer between 1 and 2,850), ts team's Coaches Poll ranking (an integer between 1 and 1,475), and its computer ranking (a float between 0 and 1). Your program should includeExplanation / Answer
C program is given as follows
######################################################
#include<stdio.h>
/*
Function to compute harris score based on harris poll ranking
retuns (harris rank/ 2850)
*/
float calc_harris_score(float value){
float hscore_result=value/2850;
return (hscore_result);
}
/*
Function to compute coaches score based on coaches poll ranking
returns (coaches rank/ 1475)
*/
float calc_coaches_score(float value){
float coaches_result=value/1475;
return (coaches_result);
}
float calc_bcs_score(float hscore,float cscore,float computer_score){
// calculating harris poll score
float harris_score=calc_harris_score(hscore);
// calculating coaches poll score
float coaches_score=calc_coaches_score(cscore);
printf("Harris Poll score: %f ",harris_score);
printf("Coaches Poll score: %f ",coaches_score);
printf("Computer ranking: %f ",computer_score);
// finding BCS score which is = (harris score+ coaches score+ computer score)/3
float result= harris_score+coaches_score+computer_score;
return result/3;
}
int main(){
float harris; // variable which stores harris poll ranking
float coaches; // variable which stores coaches ranking
float computer; // varibale which stores computer ranking
printf("Enter the team's Harris Poll ranking (1-2850):");
scanf("%f",&harris);
printf("Enter the team's Coaches Poll ranking (1-1475):");
scanf("%f",&coaches);
printf("Enter the team's computer ranking (0-1):");
scanf("%f",&computer);
printf("Resulting BCS score: %f",calc_bcs_score(harris,coaches,computer));
return 0;
}
################################################################################
Output
#######
Enter the team's Harris Poll ranking (1-2850):200
Enter the team's Coaches Poll ranking (1-1475):500
Enter the team's computer ranking (0-1):0.4
Harris Poll score: 0.070175
Coaches Poll score: 0.338983
Computer ranking: 0.400000
Resulting BCS score: 0.269720
#################### PYTHON PROGRAM START ###############################
def calc_harris_score(value):
hscore_result=value/2850
return (hscore_result)
def calc_coaches_score(value):
coaches_result=value/1475
return (coaches_result)
def calc_bcs_score(hscore,cscore,computer_score):
harris_score=calc_harris_score(hscore)
coaches_score=calc_coaches_score(cscore)
print("Harris Poll score: ",harris_score)
print("Coaches Poll score: ",coaches_score)
print("Computer ranking: ",computer_score)
result= harris_score+coaches_score+computer_score;
return result/3;
harris=float(input("Enter the team's Harris Poll ranking (1-2850):"))
coaches=float(input("Enter the team's Coaches Poll ranking (1-1475):"))
computer=float(input("Enter the team's computer ranking (0-1):"))
print("Result=",calc_bcs_score(harris,coaches,computer))
############### PYTHON PGM END ####################################################
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.