1
$\begingroup$

Is there any recommendation on an online platform that teaches and allows practicing object-oriented programming (OOP) in Python?

I am familiar with Hackerrank and HackerEarth, however, they do not have practice problems related to Object-Oriented Programming in Python but they do have problems related to other concepts.

$\endgroup$
4
  • 2
    $\begingroup$ I don't think that any such resource exists, though I would love to be wrong about that. $\endgroup$ Commented Apr 22, 2021 at 12:27
  • $\begingroup$ Can you be more specific on "practice for OOP"? Maybe looking in the SELF / Smalltalk / old Javascript area or reading through Bertrand Meyer's books might be helpful. $\endgroup$ Commented Apr 24, 2021 at 11:29
  • 2
    $\begingroup$ Why not take any book with exercises and do them online? And why is online so much better than in a local IDE? $\endgroup$ Commented Feb 27, 2022 at 15:10
  • 1
    $\begingroup$ @VictorEijkhout And why is online so much better than in a local IDE? – As in answer below regarding REPL.IT, code can be shared with and executed by a teacher / mentor / more experienced programmer, who can help learning overcome difficulties - and can be done in real-time while discussing the code and reasons for the chnages - I do this all the time when supporting new learners of Python. W3Schools "embedded" code is also a very powerful teaching aid - if the student attempts the exercises. $\endgroup$ Commented Apr 21, 2023 at 12:40

1 Answer 1

2
$\begingroup$

replit.com allows you to code online and you can also set up tests for the Repl, as well as embed the code into a blog or LMS.

I've an example here based on a tutorial here. You'd need an account to "collaborate" but the images are below.

The code runs the main.py file when the "Run" button is activated.

I made a Point class in point.py and this is called from the main in main. the Point class

There are other features such as version control, sharing for a collab, database, forking, etc. the main file that gets exeuted

Repl introduced classroom some time ago- the demo video shows some of the capabilities for assignments. Last year this was replaced by Teams for Education.

While better, it is not free, but there is a 4-month free trial -- you can see a demo of this "update" here.

Each student "gets their own copy" of an assignment, and the interface is quite pleasant- they can see due dates, status, etc, and you can build in unit tests that they should pass before submitting an assignment.

Student view of assigned work

Github classroom (demo here) is another option but may not be the easiest to start with. Using Repl you could at least share code and have the class make their own Repls and write code to pass tests, or code a class given a class diagram or problem statement.

Hope this helps. Not exactly OOP Codingbat but might give you some ideas. Another useful site is this. It approaches OOP with Python using games. PyGame will run in repl as well, allowing some collaboration on games with many classes to be completed. An assignment can allow each student to get a fork of what you post, OR allow students in groups to get a fork between a group.

$\endgroup$
3
  • 2
    $\begingroup$ REPlit.com Teams for Education is now free. $\endgroup$ Commented Sep 13, 2022 at 23:32
  • $\begingroup$ Yes, I was paying for it myself as it was worth having.... I was glad to see it become free though. It is massively beneficial that I can see who has started a lab (shows fork time), who has coded a solution, who tested and submitted, and who has had it reviewed (by me). Compared to when I used to have them upload to moodle, then download and review, now I write tests for all the lab functions, can leave comments (not #, but a thread like in MS Word) and so on. I can't recommend it enough. $\endgroup$ Commented Sep 28, 2023 at 19:09
  • $\begingroup$ When they retired the Edu package, I evaluated many options- I am currently using CodeHS as it has a lot of the same functionality even on the free plan, and comes packed with a lot more features if you have a budget. In the free plan I use, I can use or plug-in any of their pre-made courses, and that is what I have done. For my functional programming course I forked their Basic python course, and added all of my own exercises. For my OOP course, I got a single unit I could use, and then enhanced it and build all of the other parts of the course over the semester. $\endgroup$ Commented Nov 10 at 1:08

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.