Skip to content
Snippets Groups Projects
Commit dbd34c81 authored by cprutean's avatar cprutean
Browse files

Update 2 files

- /Checkpoints/Checkpoint1.ipynb
- /CourseNotes/HowtoWriteaComputerProgramfromScratch.ipynb
parent bc03a743
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:33931eba tags:
## Checkpoint 1
### Aim
To write a basic `Python` program to prompt for a floating point number, read it in, perform basic arithmetic and print out the result.
### Task
Write a `Python` program to calculate and output the radius and surface area of a sphere from its volume.
Your program should:
1. Prompt for the volume of a sphere in $mm^3$.
2. Calculate and print out to the terminal the radius and the surface area of the sphere in m and $m^2$ respectively in an understandable format.
Check your program works for a range of volumes, both large and small and that you have the output units correct.
### Background
To complete this checkpoint you need to have read and studied the following course sections:
1. [Basic Variables](../CourseNotes/variables.ipynb)
2. [Printing and Reading to/from the terminal](../CourseNotes/terminalIO.ipynb)
3. [Adding Mathematical Functions](../CourseNotes/functions.ipynb)
### Checkpoint
- Check carefully that you have fullfilled at least the assessement criteria below. Call a demonstrator, show them your code, and run your program with the following input volumes:
- $ 1.4 \times 10^6 \text{ mm}^3 $
- $ 3.7 \times 10^{-4} \text{ mm}^3 $
- $$ 1.4 \times 10^6 \text{ mm}^3 $$
- $$ 3.7 \times 10^{-4} \text{ mm}^3 $$
- Ensure that the demonstrator finds you in Learn. Please check that your pass/fail (0/1) has been entered correctly (you should be able to see this in Learn).
### Assessment
To pass this checkpoint:
- The program works for the supplied numbers, *including* correct powers of 10.
- Prompting is sensible and the output is clear.
- Variable names are concise, but explain their purpose, and there are basic commenets explaining the operation of the program.
### Next steps
Once you have completed this checkpoint, please continue with the [Week1](../WeeklyTasks/Week1.ipynb) tasklist.
%% Cell type:code id:8d47fffa tags:
``` python
# Placeholder for a comment to describe what this program does (replace as appropriate)
# Describe the input here
...
# Describe how the input is processed to get to the desired results
...
# Describe the outputs produced
...
```
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment