Error
There was an error loading the page.
In the first part, the student must write an R function to compute the first $n$ terms of the series $\frac{1}{k!}$.
In the second part, they must use that function to calculate an approximation to $e$ using a given number of terms of the series.
Metadata
-
England schools
-
England university
-
Scotland schools
Taxonomy: mathcentre
Taxonomy: Kind of activity
Taxonomy: Context
Contributors
Feedback
From users who are members of Programming extension :
![]() |
said | Needs to be tested | 3 years, 1 month ago |
History
Christian Lawson-Perfect 1 year, 10 months ago
Published this.George Stagg 3 years, 1 month ago
Gave some feedback: Needs to be tested
George Stagg 3 years, 1 month ago
Created this.Name | Status | Author | Last Modified | |
---|---|---|---|---|
Write an R function to approximate e | Needs to be tested | George Stagg | 10/05/2023 13:34 | |
Write an R function to approximate e | Ready to use | Christian Lawson-Perfect | 23/11/2023 12:24 |
There are 25 other versions that do you not have access to.
Name | Type | Generated Value |
---|
randn | integer |
13
|
||||
series_function | string |
series <- function(n) {
k
|
||||
series_placeholder | string |
series = function(n){
# Co
|
Generated value: integer
13
→ Used by:
- "Part b)" - prompt
- "Part b)" - Variables to include in code
Use this tab to check that this question works as expected.
Part | Test | Passed? |
---|---|---|
Code | ||
Hasn't run yet | ||
Code | ||
Hasn't run yet |
This question is used in the following exam: