Draft Higher Python Resource

  • David Jack
    Participant

    Here is my DRAFT Higher Python resource. Please feel free to point out mistakes, if you think I haven’t went into enough detail on certain aspects etc etc. I’m very open to feedback and I am looking to make the best resource I can. Thank you to all the teachers who have sent feedback so far, particularly Sean Stratton.

    Particular attention should be paid to the sections on Array of Records & CSV files.

    I’ve been staring at it for so long that I may have missed some very obvious things. I’m also mostly self taught, so if there are simpler ways of doing things then I’d love to hear about them.

    I still plan to have the finished resource online by the end of this term, so I would appreciate feedback sooner rather than later.

    David Jack
    Participant

    Upload didn’t work due to exceeding the allowed file size.

    Here’s a Gdrive link Python Higher Resource

    gordonrae
    Participant

    Hi David,

    That’s a great resource on first look. Thank you for taking the time to share it. Initial feedback is to suggest that you change the Evaluation Appendix to represent the Higher evaluation “headings”, as it looks like they are still N5.

    Again, thanks

    Gordon

    David Jack
    Participant

    Thank you Gordon. I have added Maintainability and Usability to the evaluation Appendix on my master copy.

    Roderick Ramsay
    Participant

    Thanks for this 🙂

    can I ask which Python IDE you use?

    Roddy

    David Jack
    Participant

    Just use the IDLE that comes with Python 3.4, although I am planning on upgrading Python and potentially moving onto using Thonny with the classes.

    The code in the resource was formatted using http://www.planetb.ca/syntax-highlight-word

    I didn’t like the idea of having to manually do it and I couldn’t find an automatic solution that perfectly matched the colour scheme of the built in IDLE.

    David Jack
    Participant

    Just spotted that the csv section on reading and writing has the same sample code. I’ll need to sort that.

    Alison Park
    Participant

    Hi David,

    Thank you for sharing this resource – just had a very quick look at it looks great. A small insignificant change – Page 14 One should be once?

    Alison

    Eoin Neil
    Participant

    Hi David,
    Had a quick zoom through it, I really like it. One of the glossary items entertained me.

    I’ll need to work through the records, and array or records stuff over the summer holiday.

    If I were to change anything I would put modular programming nearer the start.

    David Jack
    Participant
    David Jack
    Participant

    Draft has been removed from GDrive, most up to date version has now been uploaded to CompEdNet.

    Thanks to those who provided feedback, although I’m sure they’ll be other errors and demons embedded within the resource, so if you spot anything please let me know.

    jpaterson
    Participant

    Hi David

    I’d a wee issue with the array of classes on page 17. I kept getting an “Index out of range” error when I was running the program no matter which version I used. Thanks to Lee, Mark et al and their exchanges on here, I finally managed to come up with a slightly different version of the def create_array for 3.7 and I’ve had a wee tinker with the city class as well. It works a treat (feeling slightly chuffed with myself!)

    class city:
    name:str = “”
    country:str = “”
    population:float = 0.0
    language:str = “”

    def create_array(num):
    cities=[city() for _ in range(num)] #created for num cities
    return cities

    Cheers
    Jane

    David Jack
    Participant

    Thanks, I’ll try and get that updated and fixed tomorrow. If not it might not happen until next week.

    David Jack
    Participant

    I’ll be reviewing and rewriting this resource over the next few months. If you have used this resource this year I would appreciate if you could inform me of any errors you found or any suggested improvements that you think could be made.

    David Muir
    Participant

    Thanks David. Looks brilliant!

    Interesting that you have included Python v3.7 versions of Records. With this version of Python, I think dataclasses are the way to go for records. I would import dataclass and use the @dataclass decorator just to make a clearer distinction between object classes and record classes. For example, your code from page 17, I would write as:

    from dataclasses import dataclass
    
    @dataclass
    class Student:
        Forename:str
        Surname:str
        Age:int
        Height:float
        Town:str

    Oh, and thanks for the link to the syntax highlighter I’ve been using IDLE2HTML but the website is better!

Viewing 15 posts - 1 through 15 (of 19 total)

You must be logged in to reply to this topic.