Example HTML page

Data Analytics Assignment

Simple Questions for practice

  1. Write an “R” script to store the student details in a list and print the average marks of the student. The student details include name, age, register_number, branch, and marks of 6 different subjects
  2. Write an “R” script to store the marks of a student in a variable. Print the grade of the student using relational operators. Print “Grade A” is the marks is greater than 80, “Grade B” if marks in between 60 and 80, otherwise print “Grade C”.
  3. A student at AITS College is able to solve a few numbers of programs per day. Depending on the number of programs, we can able to say that the student has spent a reasonable amount of time to learn programming. Print a message “Not enough for today” if he executed less than 5 programs. Print “Average Practice”, if he executed 6 to 8 programs per day. Print a message “Well Done, You have done a good job Today” if he executed more than 8 programs.
  4. A Restaurant in Tirupathi is giving a discount for customers on New Year offer. If the bill amount is less than 1000, 10% discount will be given. If the Bill amount is in between 1000 and 1500, then a discount of 15% is applied. If the bill amount is greater than 1500, then 20% of discount is applied. Print a message that the discount given by the restaurant to the customer and print the total amount to be paid.
  5. Explain the loop constructs in R Programming with syntax and example.
  6. Write an R Program to print the (a) Sum of first 10 natural numbers, Product of first 10 natural numbers using repeat loop (b) Sum of Squares of first 10 natural numbers, Product of Squares of first 10 natural numbers using while loop (c) Sum of “multiples of 5 from 1 to 100”, Product of “multiples of 5 from 1 to 100” using for loop.
  7. Write an “R” Script to initialize two persons (Mr Rajesh and Mr Ramesh) date of birth in two separate variables in string format. (a) First, convert these strings into Date type and print the date of birth in “DD-MM-YYYY” format. (b). Computer the age difference between the two persons in a number of days, months, and years. (c) If Mr Rakesh is 750 days older than Ramesh, then print the date of birth of Mr Rakesh in “Jan-DD-YY” format.
  8. Create a data frame for the student and summarize the details of the data frame. The student’s data frame includes totally 10 number of students. Each student has attributes name, registration_number, gender, date_of_birth, marks of the student. (a) print the names and date_of_birth of the students. (b) print the student names who are having marks greater than 75. (c) print the names of the male students.
  9. Explain about the data frames in “R” programming along with syntax and example (a) Creation (b) Accessing elements (c) Modifying the elements (d) Combining the two data frames (rbind, cbind).
  10. (a). How to call a function with and without arguments in R Programming. Write a short note on Lazy evaluation in the function call with an example. (b) Annamacharya Institute is conducting an interview to select the Lab Assistants in the department of C.S.E. For this in the first round is a written test for 100 marks. Four members participated in the interview and got marks in the first round. The person who got the highest marks in this round got shortlisted for the second round. However, in the second round, the management is decided that the mark of the participant is greater than 75, then only he will be selected for the job, otherwise rejected. Write an “R” Program by using two functions to satisfy these criteria.
  11. Create a data frame of 20 students with attributes name, marks of the students in 6 different subjects, grade of the student. (Data set is “Name, M1,M2,M3,M4,M5,M6,Grade). (a). Print the complete data set. (b). Print the summary of the data set. (c). Print the mean of M4 Subject (d). Print the students name who are having marks greater than 50 in M4 subject (e). Print the names of the students who are having marks greater than 50 and less than 30. (f). print the aggregate marks by grade for M2 subject. (mean)(e).Print the first 4 records (f) print the last 4 records (g). print the structure of the data set. (h). Print the list of students and their marks who are having grade “A” (h). print the aggregate marks by grade for M2 subject. (standard deviation)
Example HTML page

Pin It on Pinterest