Repository navigation
Conversation
Khantdotcom
left a comment
There was a problem hiding this comment.
Mandatory fix - Indentation errors.
| # Since the function is called double, it should multiply the number by 2. | ||
|
|
||
| def double(number): | ||
| return number * 2 |
There was a problem hiding this comment.
Indentation error. Read this article here to see how indentation in python works.
| self.address = address | ||
|
|
||
| imran = Person("Imran", 22, "Ubuntu", "Sheffield") | ||
| print(imran.address) |
There was a problem hiding this comment.
Indentation error. Read this article here to see how indentation in python works.
| if total_pence < 100: | ||
| return f"{total_pence}p" | ||
|
|
||
| pounds = int(total_pence / 100) |
There was a problem hiding this comment.
You might want to use python's floor division here without needing int conversion.
…format_pence_as_string function
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work, these tasks are complete now
| if total_pence < 100: | ||
| return f"{total_pence}p" | ||
|
|
||
| pounds = (total_pence // 100) |
There was a problem hiding this comment.
I didn't realise python had floor division, good idea to use it here
|
Your PR description contained template fields which weren't filled in. Check you've ticked everything in the self checklist, and that any sections which prompt you to fill in an answer are either filled in or removed. If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
Learners, PR Template
Self checklist
Task code
Replace this line with the Task code 1155
Did all the exercises.