Laura Sach

Laura creates and maintains Raspberry Pi educational resources. Aside from computers, she loves cats, cakes, board games and making jam.
Location UK
Activity
-
Laura Sach made a comment
Hello! I’m Laura, and like Martin, I’m also here from the Raspberry Pi Foundation to check in on how you’re getting on and offer help if needed :)
-
Laura Sach replied to Bishnu Kumar Adhikari
Take a look on your code for checking the third answer. You've got
answer3 = quiz.answerq3.value;
if (answer2 == "10") {You're checking the value of answer2 not answer3!
-
Laura Sach replied to Miri Tuf
Hi @MiriTuf - you don't actually need the myClass p styles -you'll find that if you remove those styles the picture sits nicely within the border
-
Hi @BishnuKumarAdhikari - I think the code is working correctly. When you call the various functions to validate, if one is found to be False, the whole condition will be false so the other functions will not even be called. So you'll only get a popup for the first thing that is wrong each time.
-
Laura Sach replied to Barney Angus-Southall
Hi @BarneyAngus-Southall - what happened when you tried to add the <head> tag? Where did you add it?
-
I hope so too Bev, good luck with your charity endeavours!
-
Hey @MariaJoseBarrenecheaGonzalez glad you had fun! I've had a quick look and there are several reasons for the X's:
- Some tags you have added more than once, e.g. there are two <head> tags and the page only expects one
- Inside the <img> tag you have added all of your attributes without spaces between them which is confusing trinket
- You don't need to... -
Hi @DimitrisPapakonstantis - that is very cool. You'll need some kind of database or data structure to do this more efficiently, for example you could store your table info in a dictionary and then use the inputs to look up the appropriate information. This is well outside the scope of this course though, you're doing really well! We have some other free...
-
Hi @AworindeDamilola it looks like you haven't uploaded the images to the trinket - if you click on the image icon to the top right of the code area there are none displayed.
-
The following steps in the course explain further what you need to do :)
-
Laura Sach replied to Sean Bennett
You'll learn in week 2 that div tags are incredibly useful for changing the layout, colour, position, basically everything about your page, when you style them with CSS :)
-
Laura Sach replied to Miri Tuf
Hi @MiriTuf - if you follow the instructions above at the end you can publish your page. The <hr> tag will put a line across the page whereas the <br> tag moves onto the next blank line. The reason your links are displayed one underneath each other is because the <h3> tag automatically adds a line break when it ends.
-
Hi @MuhammadAshirIdris - if you look at the images you have uploaded, the names you have used in the code need to be identical to the name of the image. So for example "trinket.jpeg" isn't working because the image you uploaded is called "trinket.jpg" (no 'e')
-
Laura Sach replied to Oscar A
Hi @OscarA - I can't see your site, could you check the link is correct?
-
Laura Sach replied to Jason Evans
You're totally right @JasonEvans that _is_ really confusing! I'll report it and get it sorted :)
-
Laura Sach replied to Jason Evans
I don't really recommend using inline styles for anything except trying things out - it's much better to use a stylesheet, otherwise when you want to change something you have to find the exact place on the page and change it. If you want to change multiple images (e.g. you've decided all of the images on your page should be 500px wide not 400px) and you've...
-
Laura Sach replied to Dimitris Papakonstantis
You're right that if you give two elements the same ID, they will both receive the same styling - just as with a class. HTML is designed to be forgiving and your browser will accept it. BUT...this is invalid HTML, and will cause you problems later on if you want to refer to a particular element using JavaScript, for example, or to add a href to a specific...
-
@DimitrisPapakonstantis You'll need to put the font as "Times New Roman" (including the spaces and quotation marks). This is true for all fonts with multiple word names.
-
Laura Sach replied to Dimitris Papakonstantis
Aha, you've discovered the fun of responsive design which is covered in the next step!
-
Laura Sach replied to Dimitris Papakonstantis
I don't know if this analogy helps @DimitrisPapakonstantis but imagine the context of a school. The ID is like an ID card - it belongs to exactly one student. The class is like a class of students - the class can contain multiple people and you can refer to them all at once (e.g. "Class 1, go for lunch")
-
Laura Sach replied to Jason Evans
If you look at line 2 of the 'script.js' file in the trinket provided (the one containing the rndm_colour function), you'll see that the function itself contains a list of colours - red, green, blue, purple etc. You can add colours to this list and they will be included in the possibilities that can be randomly chosen.
-
Laura Sach replied to Dimitris Papakonstantis
You're right @DimitrisPapakonstantis - I just had a quick look at your code, and you can probably notice that each of your functions is pretty much identical except for the element that it shows or hides. It's possible to pass in the name of the element you want to change as an 'argument' to the function - this page might help:...
-
Laura Sach made a comment
Hi everyone, I'm Laura and I'll be one of your educators on this course. Good luck with your learning and I'll pop in regularly to check how you're getting on! :)
-
Laura Sach replied to Miri Tuf
Hi @MiriTuf - I can't see the original because it's the same trinket, but I think that your problems with the lists are because you have forgotten to close some of the <li> tags - each item in the list must start with <li> and end with </li> before the next one begins.
-
Laura Sach replied to Yihan Zhao
Hi @YihanZhao - you have misspelled “True” in the while loop near the bottom, which is what the error message is telling you
-
Laura Sach made a comment
Hello, I’m Laura and I’ll be one of your facilitators on this course. I’ll stop by each day to see whether you have any questions or problems. I hope you enjoy using guizero! :)
-
Laura Sach replied to SUAT TANIR
Hi @SUATTANIR - guizero is a wrapper for tkinter, so in a way, you will indeed be using it! However, the commands used in the course will only work if you have the guizero module installed too.
-
Laura Sach replied to Yihan Zhao
Hooray, glad it got sorted! :)
-
Laura Sach replied to Tom Shaw
I would have to agree @SebH - love a good f string!
-
Laura Sach replied to Yihan Zhao
Hi @YihanZhao - it looks like you’re missing a space between def and the first _ in the init method name?
-
Laura Sach replied to Samir Hussen
Hi @SamirHussen - it looks like you’ve got a missing closing bracket at the end there?
-
Laura Sach replied to Imaad Malik
Hi @ImaadMalik - did you copy the shapes code from the link and save it as shapes.py in the same folder as your code?
-
Laura Sach replied to Carol Wareing
Hi Carol, have a look at this project - https://projects.raspberrypi.org/en/projects/getting-started-with-git - it should get you started with the basics. If you’re using Windows I would highly recommend downloading the GitHub client for Windows because it makes the process very easy.
-
Laura Sach replied to Laurence <3 ~Beven~
Ahh! You add the getters and setters (and any other methods) inside the class. So this means they need to be indented and begin somewhere after the line
class Room():
-
Laura Sach replied to Emma George
Hmm, I’m not sure @EmmaGeorge - it sounds like if the text turns black it’s not being recognised as a Python file! Very strange.
-
I am absolutely loving that you’ve provided a changelog of what you have added with your code updates, so helpful! :)
-
Glad it’s sorted Carol. :)
-
Laura Sach replied to Seb H
Hooray! :D
-
Laura Sach replied to Samir Hussen
Brill, glad you got it sorted! :)
-
Laura Sach replied to Miguel Guerrero
I think your description property needs to be the other way around - you’d return the value of
self._description
in the property, and then set it using the setter (which is also missing the decorator). But the name one looks spot on! -
Laura Sach replied to Laurence <3 ~Beven~
How can I help @Laurence<3~Beven~ - could you explain a little more about what’s confusing you?
-
Laura Sach replied to Pragya M
Thanks @AnkitaNegi this is a really helpful reply. Yes, the best way in Python is to specify parameters with a default value, which makes them optional.
-
Laura Sach replied to Seb H
Hi @SebH please would you be able to post your full code so we can have a look and help you? That error message means that you’re trying to run the method on a string, rather than an instance of the room object.
-
Sorry @CarolWareing I missed your reply! I tried your code and the problem is that when you state the position of the shape you use
set_X
(capital X) but the method uses a lowercase x. If you change it to lowercase you’ll get both the blue and yellow rectangles. A really tricky one to spot, but (depending on which code editor you’re using) you should get an… -
Laura Sach replied to James O'
Absolutely right. The
get_details()
method doesn’t specify a return value, so Python is automatically returningNone
. So by using the print statement around the call to the method you’re effectively saying please print out whatever this method returns…which is nothing. -
Laura Sach replied to Pragya M
Hi @PragyaM - you’re clearly thinking along some good lines because this stuff is coming up later in the course!
1) If you look at week 3 of the course, we make the loop a little more complicated there than just an infinite loop
2) What you could do is convert the whole input to lowercase, like this:command = input("> ").lower()
This means that…
-
Laura Sach replied to Miguel Guerrero
Hmm, sorry about that @MiguelGuerrero - I’ve asked the team to check it out!
-
Laura Sach replied to Santiago Sánchez
Looks pretty good to me! :D I think probably the only way you could make it shorter would be to use a list and loop through the list. I had a quick go, something like this:
~~~
nombres = [“Juan”, “Diego”, “Sara”, “Santi”]
tortugas = [0, 0, 0, 0]for movement in range (100):
corre = [randint(1,5), randint(1,5), randint(1,5),...
-
Aha, yes, OOP does come up a lot, so it’s a good thing to understand the principles of :)
-
Laura Sach replied to Laurence <3 ~Beven~
LAURAence :D :D
-
Hi @CarolWareing , what happens when you try to run the program?
-
Laura Sach replied to Samir Hussen
Hi @SamirHussen - have you checked whether you used a capital letter when you created the Lauren turtle, or did you write lauren? The case of the letters matters. If that’s not it, perhaps you could post your whole code so we can have a look and help?
-
Laura Sach replied to Santiago Sánchez
Hi @SantiagoSánchez - if you want to keep track of the winner, take a look at the part of the code which begins ‘for movement in range(100):’. Inside this loop you generate a random number for each of the turtles each time the loop runs. If you create variables (or indeed a list) to add up the random number generated each time for each turtle, at the end of…
-
Laura Sach replied to Carol Wareing
Hi Carol. This course does indeed assume you have some existing Python knowledge. If you’re looking for a beginners Python course, have a look at Programming 101 - https://www.futurelearn.com/courses/programming-101
-
Laura Sach made a comment
Hello and welcome to the course! I’m Laura and I’ll be here each day to see how you’re getting on and help if it’s needed. I work at the Raspberry Pi Foundation but previously I was a secondary classroom teacher of Computer Science. I hope you enjoy the course :)
-
Hi @VictorinoJulio - if this is your first time using Python, may I recommend that you take the Programming 101 course first, because this course assumes you already know some basics of Python? https://www.futurelearn.com/courses/programming-101
-
Hello @14黄帝安.Benedict. I’ve just run your code and it works absolutely fine. The triangle doesn’t draw but you just need to add () after the triangle.draw part to make that happen. I think it’s likely that you haven’t copied the shapes.py file according to the instructions above, or it is not in the same folder? Try that part again perhaps to check?
-
Hi @14黄帝安.Benedict. - please could you share your code so that we can help you? You can paste it into a comment with ~~~ at the start and end to show that it is code, like this:
print("Hi")
-
Laura Sach replied to K T
@KT Yes you can use Thonny as well. Any Python IDE that you like using is fine.
-
Hi @HannahPitts - if this is your first time using Python I would recommend you start with the Programming 101 course instead. This course assumes you already have some Python knowledge. https://www.futurelearn.com/courses/programming-101
-
Laura Sach replied to Katie Kelsall
Interestingly, your two string methods .upper() and .lower() are methods, but len() is odd because it is a built in function rather than a method on a string. You can tell because the first two are used as xxx.upper() whereas len is used as len(xxx) where in both cases xxx is the string.
-
Laura Sach replied to Pallavi Punj
The brackets at the end imply that the things you’ve listed above are methods - i.e. you can call them upon the object and they perform some task and potentially return some information. Attributes do not have brackets because they store a value (or multiple values depending on the data type).
-
Laura Sach replied to K T
Yes that is fine
-
Laura Sach replied to Michael Dorner
Hi @MichaelDorner - if this is your first time using Python I would recommend you try the Programming 101 course first, as this course assumes you already have some Python knowledge. https://www.futurelearn.com/courses/programming-101
-
Laura Sach replied to 14 黄帝安. Benedict.
This means that Python expected to see the line after the one indicated to be tabbed in. This happens if you’ve put in your ‘for’ loop, but not then indented the lines of code which are supposed to be inside it. If you can post the whole code which causes the error we’ll be able to have a look and help you.
-
Laura Sach made a comment
Hello and welcome everyone! I’m Laura and I’ll be facilitating this run of the course. I’ll stop by every day to see how you are all getting on and to hopefully answer any questions. Hope you enjoy it! :)
-
Hopefully all of those things are covered in this course! You can use something different than ‘self’ - Python will let you, but it isn’t a good idea because almost every resource and programmer you will find uses self, so you will probably end up confusing yourself!
-
Hi @WilliamTate - welcome. If you’re a complete beginner you might want to start with Programming 101 instead and come back here later, as this course assumes some prior knowledge of Python https://www.futurelearn.com/courses/programming-101
-
Laura Sach replied to Yu Wai Luo
@YuWaiLuo Data link layer :)
-
Laura Sach replied to Yu Wai Luo
Hi @YuWaiLuo I'll try to answer :)
Q1 - HTTPS is an application layer protocol
Q2 - If person A (sender) is sending a message to person B (receiver), they encrypt the message using B's public key which B has published for anyone to see. B already knows their own private key which is used to decrypt the message.HTTPS encrypts the data exchanged between...
-
Laura Sach replied to Max M
Crikey you have eagle eyes Max! I just did the quiz to check and I didn't even spot it the first time. Yes, they are all supposed to be bytes, I'll get that changed. Thank you for flagging it up.
-
@NyreeScott Have you tried any of our other courses on Python - the Programming 101 course is a great place to start!
-
Hi Aichatou, nice to see you on the course. Please would you be able to comment in English on this course, so that you can chat with the other learners? Many thanks! :)
-
Laura Sach replied to Nyree Scott
I'm guessing that the answer of 5 comes from looking in the table, seeing 10, moving across and seeing 5 next to it and not looking at the column headings?
-
Laura Sach replied to Muskan Chadda
Hi @MuskanChadda - not sure if you saw my comment below. A kilobit is 1000bps, and a kibibit is 1024bps. So the abbreviation 1kbit/s would refer to 1000 bits per second.
-
Why do you think that might be?
-
What were your thoughts?
-
Hola Lender. Por favor, tiene que hablar en inglés en este curso para aprender y hablar con las otras personas que están haciendo el curso :)
-
Laura Sach replied to Yu Wai Luo
A kilobit is 1000bps, and a kibibit is 1024bps. So the abbreviation 1kbit/s would refer to 1000 bits per second.
-
Laura Sach made a comment
Hi everyone, welcome to the course! Mac Bowley and I will be your facilitators for this course, we'll try to help with any questions you might have along the way.
-
@ZoobiaAbbasi Please could you share your code (use a site like pastebin.com) so that we can help you?
-
Laura Sach replied to Costanza Sara Brevini
Hi @CostanzaSaraBrevini - please could you share your code so that we can have a look and help you?
-
Hi @LorraineNelson - it looks like you've saved your shell as the Python file. You'll need to delete any lines at the top of the file which say things like Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32 and make sure your first line of code is the 'from shapes import..." line.
-
Hi @AnnaParry this course assumes you know some basics of Python. I would highly recommend you begin with Programming 101 if you don't already know any Python - https://www.futurelearn.com/courses/programming-101
-
Laura Sach replied to Jesús Campos
Hello! :)
-
Laura Sach replied to Paul Boyson
Hi @PaulBoyson - what this line of code means is:
self - for this object...
.linked_rooms - in its linked_rooms dictionary...
[direction] - in the direction specified...
= room_to_link - this other object is the room you will go to if you travel in the direction specified from this object -
Laura Sach replied to Midhat Ashraf
Hi @MidhatAshraf - you should be able to get the turtle using trinket. If you look at the example project linked at the end, there is a trinket embedded there and it uses turtles - https://projects.raspberrypi.org/en/projects/turtle-race
-
Laura Sach replied to Randell Evans
Hi @RandellEvans - not sure what you mean, which programs are you referring to? The Turtle program is above, you need to copy it into your code editor and run it.
-
Hi @AntoGnanaJaslinPradeepaA - this is not a beginners course, I would recommend you start with this course if you are a complete beginner to Python - https://www.futurelearn.com/courses/programming-101
-
Laura Sach replied to Robert Corby
Hi Robert, this is not a beginners course - as it says at the start, it assumes you already have a working knowledge of Python. Well done for completing the course!
-
Laura Sach replied to Fred Wireko
Hi @FredWireko - in your Room class, in the __init__ method, is there a parameter specified? i.e. does it look like this:
def __init__(self, room_name):
...or is room_name missing?
-
Laura Sach replied to Peter Story
Hi @PeterStory - I think the code for that would depend on the operating system you are using and the IDE you are using to run Python. Are you using IDLE? You could try maximising the shell window?
-
Laura Sach replied to Ray Jones
Sure, by all means do that! This is a beginners OOP course, so we've done things that are simple and familiar.
-
Laura Sach replied to Fred Wireko
Did you get an error message? Could you share your code using either trinket or something like pastebin.com ?
-
Laura Sach replied to Luci Martin St Valery
Hi @LuciMartinStValery - please could you post your whole code, either on trinket or pastebin or similar? It's hard to work out what is wrong without seeing the problem in context.
-
Laura Sach replied to Traven M
Yup! It's showing you that there is a room object linked, and the 0x bit is the memory address of where that room object is stored.
-
Laura Sach replied to Traven M
The return statement in the move method returns the room in the direction you chose. That value is then assigned to current_room inside the while True loop in the main program. Hence, the current room becomes that room! :) Remember that self._linked_rooms contains ONLY the linked rooms for this particular room object, e.g. if the current room is the kitchen,...
-
Laura Sach replied to Tavis Reddick
Oooh that's a really interesting idea