0% found this document useful (0 votes)
3 views1 page

Student Performance R Assignment

The document presents a practical assignment for an R programming module focused on a Student Performance Management System. It includes R code for inputting student details, calculating total and average marks, and determining grades based on average scores. A sample output is provided, showcasing the results for five students with their respective grades and performance metrics.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Student Performance R Assignment

The document presents a practical assignment for an R programming module focused on a Student Performance Management System. It includes R code for inputting student details, calculating total and average marks, and determining grades based on average scores. A sample output is provided, showcasing the results for five students with their respective grades and performance metrics.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Student Performance Management System in R

R Programming – Module 1 Practical Assignment

R Program Code
roll_no <- readline("Enter Your Roll Number: ")
user_name <- readline("Enter Your Name: ")

student_id <- c(101,102,103,104,105)


student_name <- c("Amit","Riya","Kiran","Neha","Arjun")

marks_matrix <- matrix(c(85,78,90,70,65,72,88,92,95,60,58,62,40,45,38),


nrow=5, byrow=TRUE)

calculate_result <- function(sub1,sub2,sub3){


total <- sub1+sub2+sub3
avg <- total/3
if(avg>=75) grade<-"Distinction"
else if(avg>=60) grade<-"First Class"
else if(avg>=50) grade<-"Second Class"
else grade<-"Fail"
return(list(Total=total,Average=avg,Grade=grade))
}

Sample Output
ID Name S1 S2 S3 Total Avg Grade
101 Amit 85 78 90 253 84.33 Distinction
102 Riya 70 65 72 207 69.00 First Class
103 Kiran 88 92 95 275 91.67 Distinction
104 Neha 60 58 62 180 60.00 First Class
105 Arjun 40 45 38 123 41.00 Fail

You might also like