Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

# Enter your code here. Read input from STDIN. Print output to STDOUT #Task 1 #Write the function random that accept three parameters ( count

# Enter your code here. Read input from STDIN. Print output to STDOUT
#Task 1
#Write the function random that accept three parameters (count,l_limit,u_limit)
#Function should return mean and median of randomly generated numbers as list
#Instructions
#Set seed. Use set.seed(1) to set seed
#Generate count number of random numbers between l_limit,u_limit. Hint Use - runif
#Round the numbers. Example : 1,2,3,..
#Find the mean and median
#Return as list. Title of elements should be mean,median
#Enter code below
#End
random(100,0,50)
#Task 2
#Write the function date which accepts three parameters (d,m,y) and return it in date format
#Instructions:
#Convert the values to type characters
#Concatenate the characters. Hint : Use paste function
#Return as date in format 'yyyy-mm-dd'
#Enter code below
#End
date(10,10,1999)
#Task 3
#Write the function string_count which accepts a string as parameter and returns the count of words having more than 3 characters
#Instructions:
#Split the string. Use strsplit() to split the string
#Hint : Use length function to get the count of elements in list
#Hint : Use nchar function to find the number of characters in the string
#Return the count
#Enter code below
#End
string_count("It was well after noon when Sam came up the narrow lane behind the
Parker place")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

What are some global issues confronting women?

Answered: 1 week ago