<p>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.</p>
<p>I've an example <a href="https://replit.com/join/igqkjogb-seanrattigan" rel="nofollow noreferrer">here</a> based on a tutorial <a href="https://replit.com/talk/learn/Python-Advanced-Concepts-Explanation/7382" rel="nofollow noreferrer">here</a>. You'd need an account to &quot;collaborate&quot; but the images are below.</p>
<p>The code runs the main.py file when the &quot;Run&quot; button is activated.</p>
<p>I made a Point class in point.py and this is called from the main in main.
<a href="https://i.sstatic.net/ncEmH.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ncEmH.png" alt="the Point class" /></a></p>
<p>There are other features such as version control, sharing for a collab, database, forking, etc.
<a href="https://i.sstatic.net/blTyB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/blTyB.png" alt="the main file that gets exeuted" /></a></p>
<p>Repl introduced classroom some time ago- the demo <a href="https://www.youtube.com/watch?v=PYHW-1BlVgc" rel="nofollow noreferrer">video</a> shows some of the capabilities for assignments.  Last year this was replaced by <a href="https://replit.com/teams-for-education" rel="nofollow noreferrer">Teams for Education</a>.</p>
<p>While better, it is not free, but there is a 4-month free trial -- you can see a demo of this &quot;update&quot; <a href="https://www.youtube.com/watch?v=hCgGzIUJtY4" rel="nofollow noreferrer">here</a>.</p>
<p>Each student &quot;gets their own copy&quot; 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.</p>
<p><a href="https://i.sstatic.net/NzMmO.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NzMmO.png" alt="Student view of assigned work" /></a></p>
<p>Github classroom (<a href="https://www.youtube.com/watch?v=2PuXdb8OLYo&amp;t=2s" rel="nofollow noreferrer">demo here</a>) 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.</p>
<p>Hope this helps.  Not exactly OOP Codingbat but might give you some ideas.  Another useful site is <a href="http://programarcadegames.com/index.php?chapter=introduction_to_classes&amp;lang=en" rel="nofollow noreferrer">this</a>.  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.</p>

CC BY-SA 4.0
2022-09-13T23:32:10.443Z
REPlit.com Teams for Education is now free.
TooManyCooks
CC BY-SA 4.0
2023-09-28T19:09:32.783Z
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.
srattigan
CC BY-SA 4.0
2021-05-25T19:54:04.487Z
2022-02-27T14:53:25.933Z
2022-02-27T14:53:25.933Z
srattigan
<p>Is there any recommendation on an online platform that teaches and allows practicing object-oriented programming (OOP) in Python?</p>
<p>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.</p>

CC BY-SA 4.0
2021-04-22T12:27:15.263Z
I don't think that any such resource exists, though I would **love** to be wrong about that.
Ben I.
CC BY-SA 4.0
2021-04-24T11:29:07.730Z
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.
DarkTrick
CC BY-SA 4.0
2022-02-27T15:10:56.200Z
Why not take any book with exercises and do them online? And why is online so much better than in a local IDE?
Victor Eijkhout
CC BY-SA 4.0
2023-04-21T12:40:11.523Z
@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.
Clive Long
<programming><object-oriented-paradigm><python>
Online Platform for practicing Object Oriented Programming in Python
# Online Platform for practicing Object Oriented Programming in Python

(Asked by: username_0 on 2021-04-22)

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.

**Tags:** programming, object-oriented-paradigm, python

> **Comments:**
> **username_1**: I don't think that any such resource exists, though I would **love** to be wrong about that.  
> **username_2**: 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.  
> **username_3**: Why not take any book with exercises and do them online? And why is online so much better than in a local IDE?  
> **username_4**: @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.  

---

## 1 answers

### Answer by username_5 on 2021-05-25. Score: 2

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](https://replit.com/join/igqkjogb-seanrattigan) based on a tutorial [here](https://replit.com/talk/learn/Python-Advanced-Concepts-Explanation/7382). 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](https://i.sstatic.net/ncEmH.png)](https://i.sstatic.net/ncEmH.png)

There are other features such as version control, sharing for a collab, database, forking, etc.
[![the main file that gets exeuted](https://i.sstatic.net/blTyB.png)](https://i.sstatic.net/blTyB.png)

Repl introduced classroom some time ago- the demo [video](https://www.youtube.com/watch?v=PYHW-1BlVgc) shows some of the capabilities for assignments. Last year this was replaced by [Teams for Education](https://replit.com/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](https://www.youtube.com/watch?v=hCgGzIUJtY4).

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](https://i.sstatic.net/NzMmO.png)](https://i.sstatic.net/NzMmO.png)

Github classroom ([demo here](https://www.youtube.com/watch?v=2PuXdb8OLYo&t=2s)) 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](http://programarcadegames.com/index.php?chapter=introduction_to_classes&lang=en). 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.

> **Comments:**
> **username_6**: REPlit.com Teams for Education is now free.  
> **username_5**: 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.  

---

