String and Function in R Programming | R Programming Solved Assignment

Assignment 3: String and Function in R Programming

Assignment 3: String and Function in R Programming

1. Write a R program to accept a string from user and display the length of the string.

Answer :

 


2. Write a R program to accept a string in lowercase and display it uppercase and vice versa

Answer :


3. Write a program to check whether a input number is prime number or not using user defined function.

Answer : 


SET A:

1. Write a program to calculate factorial of a input number using user defined function.

Answer : 


2. Write R program to find the factors of a given number using user defined function

Answer : 


3. Write a R Program to connect two different strings.

Answer:


SET B:

1. Write a program to calculate xy using user defined function (Use default parameters)

Answer : 


2. Write R program to accept a string and character from user and replace all occurrences of that character from string with other character.

Answer : 


3. Write a recursive function in R to calculate multiplication of all digits of a given input number.

Answer:


4. Write a function which accepts one number. Function should return 1 if the number is Perfect No, otherwise function should return 0.

Answer :


5. Write a function isPrime, which accepts an integer as parameter and returns 1 if the number is prime and 0 otherwise.

Answer :


SET C:

1. Write a R program to print the numbers from 1 to 100 and print "Fizz" for multiples of 3, print "Buzz" for multiples of 5, and print "FizzBuzz" for multiples of both.

Answer :


2. Write a program to calculate sum of following series up to n terms using user defined function Sum=X+X2 /2!+X3 /3!+……

Answer :


String and Function in R Programming | R Programming Solved Assignment String and Function in R Programming  | R Programming Solved Assignment Reviewed by technical_saurabh on February 23, 2021 Rating: 5

No comments:

Powered by Blogger.