Question: use R script to answer Write a function called trianglrf) that prints a triangle composed of asterisks. The function's argument is h (the triangle's height

use R script to answer Write a function called trianglrf) that printsuse R script to answer

Write a function called trianglrf) that prints a triangle composed of asterisks. The function's argument is h (the triangle's height - imagine that R's output is rotated to the lefl). For example, It is generated by specifying h=6. Other sample outputs are: \begin{tabular}{|l|l|} \hline \multicolumn{1}{|c|}{h=2} & \\ \hline & h=5 \\ \hline & \\ & \\ & \\ \\ \\ & \\ & \\ \\ & \\ & \\ \hline \end{tabular} As you go through the items below, the state of the trianglr0 function improves. 1.) Create the triangir0) function without any input validation yet. 2.) Copy your codes from the previous item. Add input validation to the triangir0 function. The value of h must be a positive integer from 2 to 10 only. 3.) Copy your codes from the previous item. Specify a default value (h=5) for the trianolr0 function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!