GithubHelp home page GithubHelp logo

lunduniversity / schoolprog Goto Github PK

View Code? Open in Web Editor NEW
15.0 7.0 6.0 3.7 MB

Programming exercises for primary and secondary education, in Swedish.

Home Page: https://lunduniversity.github.io/schoolprog/

Python 66.98% HTML 6.86% Scala 17.69% TeX 2.07% SCSS 6.40%
education swedish

schoolprog's People

Contributors

ahnlabb avatar altaired avatar dependabot[bot] avatar erikbjare avatar exoji2e avatar gorelhedin avatar idarasmark avatar patrikpersson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

schoolprog's Issues

Interesting datasets

We have an opportunity to involve students in data science if we have have interesting datasets available.

Sources

  • Weather data
    • SMHI
  • Open Government data
  • Any others?
    • EU Open Data Portal (might have a high signal-to-noise ratio for our purposes)
    • Market price data
    • We could ask people on forums like r/datasets if they have any ideas

Note that the datasets probably have to be open access in order for us to receive able redistribute them (which we'd want to guarantee availability).

Guidelines for repository contributors

Wherever we are on further recruitment (#4) we should probably add some contribution guidelines. Reasons to do this include:

  • Clarify the scope of the project to ourselves and others
  • Help teachers or various testers create good issues
  • Encourage external people with ideas for great exercises to submit them as issues or pull requests
  • Expound our overarching goals

Towards this goal we could add any subset of:

Graphing Exercise

Exercise teching how to plot different functions in python. Can probably take some inspiration from this video.

Create exercise with gcd

Görel wants an exercise where a function for calculating gcd is created. This will be used in a turtle graphics exercise.

I guess we need a small description + proof for Euclid's algorithm, and a little bit of boilerplate code for an iterative solution.

Maybe the exercise can include some fractional numbers that needs to be reduced as well.

Refactor exercises

The exercises are nice, but some refactoring is needed:

  • Split Turtle into three smaller exercises. (It is too long.)
    • Turtle 1: An extremely short exercise where the goal is to just get started with repl.it and turtle
    • Turtle 2: Half or so of the current Turtle
    • Turtle 3: The rest of it
  • Split Avlusning into two smaller exercises. It is too long currently.
  • Make sure there are sufficient hints in Turtle 1, 2, and 3, so students don't get stuck.

Recruiting more students

If we need to, we could probably recruit more students by:

  • Posting in the D-guild Facebook group
  • Making a post on the Code@LTH Facebook page

Exercise Back-to-start

@patrikpersson Nice polygon/back-to-start exercise. I did some small adjustments after feedback from teachers. Here are some ideas for additions to the exercise. Either extend the current exercise, or perhaps better, add an extra.


  1. Omkrets

Testa ditt program för större värden på n. Vad händer? Varför?

Uppdrag: Ändra programmet så att omkretsen blir lika stor oavsett hur många sidor månghörningen har. Paddan skall alltså gå lika långt oavsett antal sidor.

Tips: Dividera sidlängden med n. Ändra konstanten (100) så att figurerna blir lagom stora.

  1. Hur mycket svänger paddan?

Vid varje hörn svänger paddan en viss vinkel.

Uppdrag: Skriv ut vid varje sväng hur mycket paddan svänger. Du kan använda funktionen write(v) för att skriva ut.

Tips: Lägg till satsen t.write(360.0/n) i loopen.

Stämmer det att summan av alla svängarna är 360? Kontrollera för några olika månghörningar.

  1. Extra: Räkna ut innervinkeln

Vinkeln som paddan svänger kallas en yttervinkel till månghörningen.

...Visa bild... där yttervinkeln är markerad med v

Uppdrag: Ändra programmet så att i stället innervinklarna skrivs ut vid varje sväng.

Öppet tips: Om du vet yttervinkeln v, hur stor är då innervinkeln?

Tips: 180-v

Tips: Du skall alltså lägga till satsen t.write(180-360/n) i loopen.

Hur stor är summan av alla innervinklarna? Kontrollera för några olika månghörningar. Vi lär oss ju att summan av alla innervinklarna i en triangel är 180. Kontrollera att det stämmer.

  1. Extra: Summan av innervinklarna.

Kan du hitta ett mönster för vad summan av innervinklarna är? Kan du skriva upp en formel för summan av alla innervinklarna för en liksidig n-hörning?

Svar: Låt v vara yttervinkeln. Summan av alla yttervinklarna är 360. Varje innervinkel är 180-v. Alltså är summan av alla innervinklar n*(180-v).

Uppdrag: Lägg till satser efter for-loopen så att du skriver ut summan av alla innervinklarna. Flytta först paddan lite så att utskriften hamnar nedanför månghörningen.

Tips: Du kan flytta paddan utan att rita genom att först göra t.penup(True). Om du tycker paddan är i vägen kan du dölja den med t.hideturtle()

Travis fails to build

I upgraded GemFile and GemFile.lock in order to avoid security vulnerabilities. I can generate the Github pages locally, but the build on Travis fails. Don't know how to fix this. Don't know if this has to do with my updating the GemFiles or not.

Details:

I did a first unsuccessful attempt, just changing the versions of ffi and jekyll as suggested in the security alert, and without building locally. But this caused Travis to fail (Travis request 180).
Then I removed that commit, but again, Travis failed (Travis request 181), even though this state built earlier (in October - request 179). Then, I installed Ruby on my computer, got the build to work locally, and in that process updated all the gems that "make serve" complained about. Finally, I got the web site running locally, and everything looked fine. I then committed and pushed the changes, but now the Travis build fails.

Fraction-exercise

I am writing up an exercise to help students with understanding fractions. It is

  • in Swedish
  • for both Scala and Python
  • fragmented into a number of small pages, to do things step by step

Stuff left to do:

  • Move pages about tuples, functions, main programs to separate directory.
  • Complete it (there are some missing parts)
  • Construct solutions
  • Debug the instructions (I'm sure there are mistakes, didn't try to run it yet)

More to do, after meeting on Feb 7 2018:

  • Byt länk (fortsätt här) till att innehållet ligger under.
  • Se till att alla länkarna till extramaterial länkar tillbaka.
  • 2:4 (Otydligt vad vi menar här, skriv ut uppgift 2 av 4 istället)
  • Ta bort tuple och använd a, b, c, d direkt. Annars kommer vi förmodligen tappa bort eleverna här.
  • Flödet genom uppgiften: länk för gå vidare (hoppa ner till efter övningen) istället för länk till övning.
  • Anpassa övningen - den behövs inte lika mycket nu när uppdraget Piece-of-cake finns.
  • Bland uppgifterna, förtydliga till: "Använd funktionen i föregående uppgift för att läsa in två bråk."
  • Ge eleverna några testfall, så de kan validera att de har gjort rätt.
  • Add suitable tags to both Fractions and Piece of Cake.

Piece-of-cake exercise:

  • Introduce new exercise Piece of Cake, that should precede this one
  • Comment on least common divisor
  • Construct solution and debug instructions

Set up website

Stuff left to do:

  • Configuration
  • Instructions for how to build the site locally
  • Continuous integration (automatic hosting of master branch)
  • Google Analytics
  • Design
    • Navigation
    • Site structure
    • Styling

Handling of media

There are three ways that we could handle binary media (typically I guess images/gifs):

  • Plain git
    • pros:
      • simplest
      • relative links
      • versioning
    • cons:
      • full change history can get big and every repo has to always download the whole thing
  • git-lfs (or similar)
    • pros:
      • relative links
      • versioning
    • cons:
      • some setup
      • public forks can't use git-lfs independently (?)
  • Separate hosting
    • pros:
      • media handling not limited by git (which was not created for large binary files)
    • cons:
      • no relative links
      • solution dependent cons may include: no versioning, reliance on another 3rd-party service in addition to GH etc.

In math-exerciser I went with "separate hosting" where I still used github but created a new repo with git-lfs where I put the gif, this solution has versioning and no reliance on other 3rd-party services but critically does not allow for relative links (see #26). Depending on the amount of media (and maybe more importantly media changes) we expect just using plain git may be entirely feasible. What do you think @ErikBjare?

Turtle exercises

I have updated the turtle exercise:

  • Written it in Swedish - moved the old text to README_EN.md
  • Added subexercises/skeletons for "SARA": Sequence, Alternative, Repetition, Abstraction.
  • Added headings for exercises for Tårta and Blomma. Which would be nice to have before starting the Piece-of-cake exercise
  • Added headings for exercises for Rita koordinataxlar. Which would be nice to have before starting the Graphing exercise.

Things left to do:

  • Added turtle cheatsheets for both Python and Scala.
  • Complete the turtle exercise for Python. (Reasonably complete. Could add some more.)
  • Translate the turtle exercise to Scala.
  • Complete the english version.
  • Translate Björn's Kojo-exercises. Put in separate exercise.

@obakanue , will you take it from here?

Choice of REPL/IDE

We are currently using repl.it, in my opinion it fulfills our primary criteria:

  • Simple/no setup
  • Good interface (clean and intuitive)
  • Easy and unlimited sharing of templates and example code

However, some other features would be nice:

  • Full support of builtin modules (#9)
  • SciPy, NumPy
  • Plotting
  • GUI support beyond plotting and turtle

I think we should discuss this before we are completely invested in repl.it.
Plotting is my foremost concern, can we do it with repl.it?

[weatherdata] repl.it does not seem to support http-requests

I'm getting long errors when I try to use the API in #8 on repl, here is a version on repl

I see some solutions:

  1. We upload some weatherdata to repl.it
    • We can't upload everything, since it's about 500MB in raw format.
    • The students can't explore other weather stations (like their home town)
    • The students can't extend the API, making the exercise quite limited, and maybe not suited to be a week long project.
  2. We find another site where it's possible to run python, and do http-requests
  3. We do an offline version, where they run python locally
    • We get the entire installation-problem

I think we should check out some other sites, and if we don't find anything suitable, we should do both 1 and 3.

Contrarian thought in maths education

As someone who have never been very happy with the current state of maths education, I have naturally been drawn towards the contrarian ideas of how it should be. Since I'm slightly worried that the introduction of programming into school curricula might go down the same dark path, I'd like us to at least try and get these ideas out there, because I really think there is something to them. @exoji2e probably agrees with me.

Here are some of my favorites:

My hope is that we could write up a "teaching philosophy" document similar to the one written for fast.ai where we try to raise awareness about these issues. I think it would serve as a great exercise not only for the teachers and students who might read it but also for ourselves.

Debugging exercise

We need an exercise to help understand what can go wrong and how to debug.
Things to cover:

  • syntactic errors in python, like missing colon in def or for
  • missing definition of a name - caught at runtime, I think
  • wrong order of definitions
  • wrong indentation - strange things might happen
  • two variables with the same name, by mistake. Can give confusing errors.
  • pass wrong type as arg to function
  • teach how to do debugging with print statements
  • infinite loop - how to break out of it
  • work in small steps
  • save working revisions to be able to back up when lost. Would be great if revisions could be named in repl.it, but I haven't found any way of doing that.

Possibly also:

  • differences between Python 2.7 and Python 3. Can be very confusing if you look at the wrong documentation. E.g., 3/2 means int-div in Python 2.7, but float-div in Python 3. The turtle is Python 2.7. The other repl is Python 3.
  • When using online editors like repl.it and kojojs - what do to if everything hangs (reload web page)

Exercise Hitta Pi

This exercise is just a skeleton. Need to fill in text and create solution.

Weather data exercise

There is currently a dataset and some ideas for tasks in /exercises/weatherdata.
What needs to be done is:

  • write task descriptions
  • think through what 3rd party libraries should be used. Maybe datetime would make it easier to plot?
  • think through the order of tasks and what hints are reasonable to give.
  • write a solution for all tasks
  • make a repl.it env that contains the api-code. (That opens the zipped data, etc)

Feel free to help me with this. I might start on something of the above, and Ill write so here in that case!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.