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

Programming Exercises

Create a vector and calculate the standard deviation of its elements.

Easy

Problem Statement

Create a vector and calculate the standard deviation of its elements.

Sample Input

Vector: [10, 20, 30, 40, 50]

Sample Output

Standard Deviation: 15.81

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
# Predefined structure vector <- c(10, 20, 30, 40, 50) std_dev <- sd(vector) print(paste("Standard Deviation:", round(std_dev, 2)))
Log in or sign up to run or submit your code.Log inSign up
Input
Vector: [10, 20, 30, 40, 50]
Expected Output
Standard Deviation: 15.81