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 Demos :
![]() |
said | Ready to use | 3 years, 2 months ago |
History
Christian Lawson-Perfect 3 years, 2 months ago
Published this.Christian Lawson-Perfect 3 years, 2 months ago
Gave some feedback: Ready to use
Christian Lawson-Perfect 3 years, 2 months ago
Created this as a copy of Write an R function to approximate e.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 exams:
- Manajit's copy of Programming extension demo by Manajit Chakraborty in Manajit's workspace.
- Programming extension demo by Christian Lawson-Perfect in Demos.
- claire's copy of Programming extension demo by claire lines in claire's workspace.
- Simon's copy of Programming extension demo by Simon James in Simon's workspace.
- Lars's copy of Programming extension demo by Lars Hansson in Lars's workspace.
- claire's copy of Programming extension demo by claire lines in claire's workspace.
- NUMBAS TRAINING claire's copy of Programming extension demo by claire lines in Brunel University Maths.
- Alexander's copy of Programming extension demo by Alexander Holvoet in Alexander's workspace.
- Mahdieh's copy of Programming extension demo by Mahdieh Zaker in Mahdieh's workspace.