Uploaded February 2023 | Updated December 2026, 13 minutes ago
In this video we find out how to create, write, append and read files using Python. We learn the basics of file handling which will help you in your computer science career.
π See the full free GSCE Computer Science Python course here:
youtube.com/watch?v=lv8Tl5lBJC0&list=PLrIm-p2rpV0Hczso9dnu_sAJucaaAD_Hc
π GSCE Computer Science Paper 2022 Walkthrough (OCR J277/02)
youtube.com/watch?v=bmrVVtvtZGY
π οΈ Tools:
1. PyCharm Community Edition - Free Official Download jetbrains.com/pycharm/download/#section=windows
π Contents:
00:00 - Create a file
01:03 - Write to a file
02:20 - Append to a file
03:39 - Read from a file
#gcse #computerscience #ocr #python #pythonbeginners #pythonfile #studystream+
In this video we find out how to create, write, append and read files using Python. We learn the basics of file handling which will help you in your computer science career.
π See the full free GSCE Computer Science Python course here:
youtube.com/watch?v=lv8Tl5lBJC0&list=PLrIm-p2rpV0Hczso9dnu_sAJucaaAD_Hc
π GSCE Computer Science Paper 2022 Walkthrough (OCR J277/02)
youtube.com/watch?v=bmrVVtvtZGY
π οΈ Tools:
1. PyCharm Community Edition - Free Official Download jetbrains.com/pycharm/download/#section=windows
π Contents:
00:00 - Create a file
01:03 - Write to a file
02:20 - Append to a file
03:39 - Read from a file
#gcse #computerscience #ocr #python #pythonbeginners #pythonfile #studystream+
![Part 19 - Implement Codeception Data Providers [How to use TDD to build a REST API in Laravel 6]
We know we have other required parameters, but we donβt want to write a test for each one.
We know we are only testing against the Title Attribute. This is where Codeception Data providers come into play.
We can declare our Data Provider as an assertion above our test. We are basically declaring what method we will be using as our data provider. The method will return an array of arrays.
We can then pass this into our test. We will replace the existing constant with the data coming back from our data provider.
When we run our tests, Codeception thinks it has multiple tests rather than the one test we have.
Watch the next video here:
https://youtu.be/Je224_lLSsY
Watch this course in full here:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F-rl4NPjNslEmW-D83AHOr
Laravel Tutorials:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0FmbeNsYYh_4Fcb4Ibq29tJ
2 - 3 min Developer Quick Tips Series:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F6yyK99B9TU6yVhnPdzelBWatch this course in full here:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F-rl4NPjNslEmW-D83AHOr Part 19 - Implement Codeception Data Providers [How to use TDD to build a REST API in Laravel 6]](https://i.ytimg.com/vi/iIrrrUCAM1w/mqdefault.jpg)









![Part 17 - Slight refactor and clean up [How to use TDD to build a REST API in Laravel 6]
Letβs do some clean up. We updated most places in the code base to use the constants from the model, but we did not update everything. I noticed a few occurrences.
Letβs check our tests. You know, this is part of owning and maintaining a code base is. We might add something for the benefit of the code base but not go about it the right way. Thatβs not ideal, but in our scenario, we have tests to cover any changes we make. We also have time to maintain our codebase. So when we are refactoring, we must be confident our tests will catch our bugs.However, tests are only as good as you write them to be. So when you write a test, think about what you are testing and ask yourself: Does your test actually cover that scenario.
Check migration, factory, controller. After those changes, letβs run our test suite to make sure everything still works as expected. I canβt stress how important it is to keep doing this. Keep your code cycles small. Same with your commits. Letβs commit this work.
Another important lesson to learn is, donβt keep dead code in a database. You are much better off removing stuff you donβt need. Letβs start with this controller. We can remove the create() and edit() methods.
We can also get rid of our User model and we can also get rid our User factory. Run your test suite. As expected, everything passes.
Watch next video here:
https://youtu.be/ugy6MEeeVWI
Watch this course in full here:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F-rl4NPjNslEmW-D83AHOr
Laravel Tutorials:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0FmbeNsYYh_4Fcb4Ibq29tJ
2 - 3 min Developer Quick Tips Series:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F6yyK99B9TU6yVhnPdzelBWatch this course in full here:
https://www.youtube.com/playlist?list=PLrIm-p2rpV0F-rl4NPjNslEmW-D83AHOr Part 17 - Slight refactor and clean up [How to use TDD to build a REST API in Laravel 6]](https://i.ytimg.com/vi/ngW5raXk6mA/mqdefault.jpg)