Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Create a data frame with columns Name, Age, and Gender and print it.

Easy

Problem Statement

Create a data frame with columns Name, Age, and Gender and print it.

Sample Input

None

Sample Output

   Name Age Gender
1 Alice  25 Female
2   Bob  30   Male
3 Carol  22 Female

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined structure data_frame <- data.frame(Name = c("Alice", "Bob", "Carol"), Age = c(25, 30, 22), Gender = c("Female", "Male", "Female")) print(data_frame)
Log in or sign up to run or submit your code.Log inSign up
Input
None
Expected Output
   Name Age Gender
1 Alice  25 Female
2   Bob  30   Male
3 Carol  22 Female