# Alex Parry

Alex is a Learning Manager at the Raspberry Pi Foundation and Computer Science teacher. When not coding, he enjoys table tennis, gaming and going for walks in the woods.

## Activity

• It often takes a long time of refining instructions before they are followed as you intended at least most of the time!

• Hi Burdoc, the example in this step is to draw a triangle by hand rather than using a Bee-Bot. The focus is on the clarity of instructions when designing a program, rather than writing a program using a specific tool.

• Hi Manuella, welcome to the course :)

• Alex Parry made a comment

Welcome, I'm Alex and I am a Learning Manager at the Raspberry Pi Foundation. I will be one of the facilitators for this course, I do hope that you enjoy it!

• Alex Parry made a comment

Welcome, I'm Alex and I am a Learning Manager at the Raspberry Pi Foundation. I will be one of the facilitators for this course, I do hope that you enjoy it!

• Alex Parry made a comment

Welcome, I'm Alex and I am a Learning Manager at the Raspberry Pi Foundation. I will be one of the facilitators for this course, I do hope that you enjoy it!

• Hi Caitlin, pleased to have you on the course! You should find some useful and practical examples on how to engage your children in computing.

• Glad you got it working Tan!

• I’m not 100% sure. Can you run the same program in two different code cells to simulate the program being run twice?

• @TanYowKheng ah I see. You’ve worked around that issue very nicely in your code though by using exception handling!

• Alex Parry replied to Tim Knight

Very good point. I think some (but not all) people in education consider Python to be easier to start with due to the minimal syntax, but errors such as a command being indented wrongly can be much harder to debug!

• It can be a pain installing libraries with IDLE. Glad to hear it worked with Mu!

• Oh that’s really annoying. Which Python editor are you using? programs written in Python 2 rarely execute in Python 3 due to the changes in the syntax e.g. a print statement has no brackets in Python 2.

• Hi Tan :) if you write to the text file (before reading it) then it will create the text file for you, hence your previous code working without errors.

I’m not sure what you mean in your question. Are you talking about Python 3 and Python 2 programs or about the text file?

• Alex Parry made a comment

Welcome, I’m Alex and I am a Learning Manager at the Raspberry Pi Foundation.

I will be one of the facilitators for this course from the 4th October to the 25th October. I hope you enjoy the course!

• Thank you Tan for all your inputs during the course. Very glad to hear that you found it so useful. Perhaps see you in one of our other Python courses in the future!

• Thanks Tan, glad to hear that you have been enjoying the course!

• Looks good Matt!

• The len function returns the length (the number of items) within the list.

• Hi Carol, the else statement will only run once which is why teamC only has one player in it. You could replace the else statement with another for loop so that it repeats for the number of players left in the players list:

for i in range(len(players)):

• @AndyStorey @B.P apologies, the problem should be fixed now. It was down to the sharing settings within our organisation.

• Hi Dani, pleased to have you here from 101. I hope you enjoy the course!

• If you are a teacher in England, you can get one for free through teachcomputing.org otherwise you have to upgrade your FutureLearn account.

• That’s cheating ;-) seriously though, nice use of numpy - it’s a great library!

• Hi Josiah, glad to have you on the course!

• Hi Malik, pleased to have you over from 101! I hope you enjoy 102 :)

• If you can follow the content then that’s fine. It’s like learning a spoken language, it’s easier to read before writing and the more you read, the more likely it is you will be able to write!

• Looks good!

• @shafinaerlangga you need another variable to store the value of the most frequent item.
At the moment the variable n stores how many times the most frequent value is present in the list. So you could have another variable called say most_frequent_value and assign it the value of i if times > n

• Thanks for your kind comments, all the best for week 3!

• Hi Matthew, I hope that reviewing some of the concepts on this course helps you continue with your Python journey.

• What error message did it give you? It worked for me when I ran it with “Bob” as the input

• Looks great!

• Alex Parry replied to K T

We don’t currently have a FutureLearn course on the Sense HAT, though we do have projects on the Raspberry Pi site here https://projects.raspberrypi.org/en/codeclub/sense-hat

• Thanks for the feedback Sharon, I’ll make a note of it for future runs of the course

• Alex Parry replied to K T

Officially we only have the virtual Sense HAT available at the moment, sorry.

• Alex Parry replied to Glen Reid

Thanks for sharing Glen, that looks great! You can still share in Pastebin if that’s easier, we are trialling the new code in comments feature on FutureLearn at the moment.

• Alex Parry replied to K T

No, to comment out large sections of a program you would use three quotations marks at the start and end, either “”” or ‘’’.

The three tildes ~~~ are just for sharing code in the comments on FutureLearn; if you put three tildes at the start and end of your program it will format the code and keep things like the indentation intact.

• That would be fantastic if you could share it when you have a chance Shirley!

• Alex Parry replied to hien nguyen

The while: True loop will keep running until the program is exited. If you close the program in the IDE you are using then it should stop running without having to turn the power off!

• Alex Parry replied to Glen Reid

Yes, only add the 3 tildes to the top and bottom of your code in the comments on FutureLearn, not in the actual program you are running.

• Alex Parry replied to Glen Reid

Yes, you can import one of your own programs as a module using the import statement. For example, if your program was called myprog.py and saved in the same folder as your new file, you would use import myprog

• Alex Parry replied to Glen Reid

Regarding the commented out code, that’s fine to leave them in. It might even be useful to other learners in showing them what parts you were testing at various points in the development of your program.

• Hope you enjoy the course Addisu :)

• Alex Parry replied to B. P

Thanks, I’ve fixed the broken link now

• Hi Bill, that sounds like an exciting venture! I’m sure you will find some interesting ideas to kickstart your group from the course content and other learners’ comments.

• Hi Corey, great to have you on the course. Post a comment if you need any help at any point :)

• Hi Miguel, that sounds really cool!

• Hi Sharon, glad to have you on the course. I hope you feel more confident about physical computing by the end of the course :)

• Alex Parry made a comment

Welcome, I’m Alex and I am a Learning Manager at the Raspberry Pi Foundation.

I will be one of the facilitators for this course alongside Matt from the 7th June to the 2nd July. I hope you enjoy the course!

• Welcome Eleanor, I hope the course helps you with your goal

• I'm not sure why RIGHT JOIN was omitted from SQLite. They decided to not include or simplify quite a few command; for joins they only support INNER JOIN, LEFT JOIN and CROSS JOIN.

• Thank you for your feedback, I've updated the instructions to specify that you need to double click in the Check column.

• Unfortunately, you can't currently. I've updated the instructions in the step to reflect this.

• In SQLite, JOIN is interpreted as INNER JOIN so you are able to. It's good to be aware though that you still are using inner join.

• You need to follow the part earlier in this article titled "Add a new computer model" before adding the sales record in activity 1 since the model_id 22 does not yet exist in the model table.

• There isn't an easy way to do it unfortunately. It would only be possible if a backup of the database was stored somewhere so that a previous version could be restored.

• There isn't an easy way to do it unfortunately. It would only be possible if a backup of the database was stored somewhere so that a previous version could be restored.

• I don't think you are able to create a new database. However, you could create a table and delete (drop) an existing table in one of the sample databases as a workaround.

• @MartiñoCervera SQLite doesn't have a date or datetime data type, hence the use of integer. Usually you would use the uppercase INTEGER but the case does not matter.

SQLite online should save any changes automatically when you run a statement. In DB Browser you can also save the project.

• That's great! I've done some research into the similarities (and differences) between learning a natural language and a programming language. Enjoy your new career ;-)

• Hi Jenny, all the best with your career development :)

• Hi Paul, it is definitely challenging to remember all the commands and how to format them. I will still look these up quite often - knowing where to find them easily is the key! Glad you are getting on well with the course :)

• @MatthewSimpson could you copy the details of one of the sales you were trying to add here? It will be easier for us to see what the problem might be

• I hope this course helps Paul :)

• Hope you and your son enjoy the course together :)

• Hi Jude, sounds like a good plan! Enjoy the course :)

• Hi Parth, hope the course helps with your teaching

• Happy to meet you too Gina!

• Hope this course helps Chirawan :)

• Hi Hande, welcome to the course :)

• Alex Parry made a comment

Welcome, I'm Alex and I am a Learning Manager at the Raspberry Pi Foundation.

I will be one of the facilitators for this course up until the 26th April. I hope you enjoy the course!

• Alex Parry replied to Adam Bell

Hi Adam, there can be several problems such as which version of Python the pillow library has been installed too. You can use our installing Python packages guide (https://projects.raspberrypi.org/en/projects/install-python-packages) or the installation instructions from the pillow documentation (https://pillow.readthedocs.io/en/stable/installation.html)....

• Alex Parry replied to Jun Suzuki

Glad you enjoyed the course Jun :)

• @JunSuzuki The code for decoding the message should go after the rest of the code for encoding the message. What it output if you just do print(output_bits[:8])? Without seeing all of your code together it's hard to debug the exact problem, you could share it using pastebin.com

• Alex Parry replied to Jun Suzuki

Can you share the Python code that was causing the problem?

• For example:
print(int(0b11111111, 2))
Will convert the binary value 11111111 from base 2 to an integer and print 255

• Hi Jun, without seeing your code I'm assuming you are trying to convert a binary number to an integer? If so, you will need to specify which base to convert from using a comma within the int() statement. In this case, you can convert from base 2 like so:
int_value = int(bin_value, 2)

• Hi Dennis, this course is created by the Raspberry Pi Foundation but doesn't go into the Raspberry Pi computers. Our course on physical computing with the Raspberry Pi and Python may be of interest to you https://www.futurelearn.com/courses/physical-computing-raspberry-pi-python/17

• That would be a nice feature. Unfortunately, you would have to build the circuit in stages currently to demonstrate what you suggested.

• There is no logical reason! In Computer Science exams, usually they will actually be in order (A, B, C etc.) no matter if it is a primary input or the output of a gate.
X and Y were chosen as they were distinctly apart from A and B. But you could use whatever labels make most sense to you!

• Apologies, that was from an old survey and shouldn't have been there.

• Apologies, that was from an old survey and shouldn't have been there. Hope the remote schooling is going OK!

• Alex Parry replied to Phil Marlow

Glad you enjoyed the course Phil

• Alex Parry replied to John Ross

• The developer tool is one of the best ways for debugging JavaScript. Unlike some programming languages, if there is a problem with your code then it just stops at that point without throwing an error. You can use console.log to help test which parts of the code are working or not.

• Hi Michael, with a Mac you would usually have to hold the function key (fn) and then press F12. Alternatively, you can right click on the page and select "Inspect" or go to View > Developer > Developer Tools

• @GrahamLongbottom @KristinaLlewellyn it depends on when you want the JavaScript to execute on the page.
If you want it to run when the page loads (like in your examples) then the HTML needs to load before the script, which is why placing the <script> tag just before the closing </body> tag will fix it.
In the next example with a button and an onclick event,...

• Welcome Robin, I hope this course helps you to further inspire your students :)

• Also it looks like your heading id is Quiz in the HTML and Quiz1 in the JavaScript

• You need to call function change_heading() from within the HTML. In the example above, the function is called by the checkbox using the command oninput="change_heading()"
Instead you could have a button could have a button, for example:

• You can use the DOM function getElementsByClassName() which will return a list of elements with the same class and then you can loop through it. The solution will be less lines of code but quite a bit tricker to implement it this way.

• Are you using Chrome? Did you include the colon : so it was about:blank without any spaces?

• It does usually take a fair bit of practice before it starts to make sense Micaela! Things should start falling into place the more you use it and break things :)

• Alex Parry replied to Mary Nginya

Yes you can, the only issue you can sometimes find is if one CSS rules overrides another.

• Hi Nicole, I had a look through your trinket but couldn't see the divs you were trying to style. Which part of the web page in particular wasn't working for you?

• Alex Parry replied to Mary Nginya

Great to hear Mary, it takes time to start all fitting into place.

• Alex Parry replied to Laura M

Thank you for your kind comments and all the best with your future web design journey :)

• Alex Parry replied to Dm Tl

Hi, there are no prerequisites for this course. The other course you mentioned is not run by us at the Raspberry Pi Foundation so I don't know how much overlap there is.

• Thanks for your feedback Edward, we will review this for future runs of the course.