Hot answers tagged

11

The question is actually more complex than it might appear, and really the answer can depend on the context. For example, at what age are the students when they are first taught to program? Is this in Primary School, High School or part of an undergraduate programme? The answer might be different in each case. It also depends on the purpose of teaching the ...


5

I started teaching Python at NCSSM in 2004. Here are some reasons I chose it. It is direct and simple, and there is not a whole ton of boilerplate to deal with at the beginning. Hello, World looks like this print("Hello, World") We all know what it looks like in Java (enclosing class needed) and C. Delimitation occurs via whitespace. ...


5

Python is a fine language for learning algorithmic thinking and problem solving (see e.g. Downey's "Think Python" (Green Tea Press, 2nd edition 2016)). Python has an enormous ecosystem, including all the range of packages for simple tasks up to heavyweight systems like SciPy for all sorts of scientific computing, NumPy for numerical computation (...


3

A very nice book is Downey's "Think Python" (2nd edition). The link leads you to a free PDF, so you can take a look without cost. It teaches problem solving using Python, not Python per se. Make sure you get the second edition, which covers Python 3 (a somewhat different language than the obsolete Python 2). There are lots of pointers to ...


3

I'm not terrifically familiar Jupyter notebooks. I've only used them a few times myself, and I didn't realize that any of them could support simultaneous editing as you've described. However, cocalc appears to be able to do what you need, though it is a paid tool. (Personally, I enjoy supporting companies that make really good tools, though I understand ...


3

Although it should probably be only one strategy among many, you might teach it through practical examples. In this short program that uses flask_user (and which students can install in just a few minutes) the decorator ensures that only authenticated users can use the route: https://flask-user.readthedocs.io/en/latest/quickstart_app.html


2

Assuming that you have solved some of the problems in Java, you have an "oracle" for your python solution. Rework a problem in Python and compare the results of your two solutions. The advantage is that since you have a basic idea of an algorithm to solve the problem, you can concentrate more on how to express the algorithm in a different language. ...


2

I didn't spend a huge amount of time looking over the practiceit resource you linked, but I glanced at a few problems, and they seemed similar to http://codingbat.com, which has exercises in both Java and Python.


2

1, 2, & 3 In most cases, I'm okay with them having the tests ahead of time. The only thing that concerns me a bit is that they can edit the tests, and GitHub would use those. What I do, and it's typically only on larger weight assignments, is to download all of the repositories. I'll then copy either a clean copy of the test files or a new set of test ...


2

In the auto grader I use, the following process is followed: The students files are copied into a pristine work area The "provided" file(s) are removed from the work area If I intend to use MOSS, the remaining files are copied for later use The "provided" file(s) are copied into the work directory The result is built (if necessary) Tests ...


2

I can not answer directly because I know nothing about Python, but I first started to use C nearly 4 decades ago, and have used it for some really complex stuff. I love C# (I use it in the context of ASP.Net) and think it is very well designed and implemented. So, I would be biased no matter what, as you know, because you never forget your first language, ...


1

There are two somewhat separate concepts of a decorator. I'm guessing that you mean the one related to using "first class" functions in Python or in a more traditional functional language. The other concept is from OO programming and involves the method structure of an object. They are related, of course, since a function in Python is an object. ...


1

At this moment, definitely Python. Because it's very easy to learn, understand and implement. Also very big and huge community around the world in terms of any help and support needed at any point of time, Large number of packages available based on the need, which simplifies and make programmers life easy, specially beginners. Also there is no need of ...


1

Hackerrank has good basic programming questions Codewars is great for having a sense of a group and have a healthy competition. The dashboard will show your score and ranking between friends and same institution.


1

This not-quite-answer hopes to give you some guidance on your self learning, beyond what you ask. But first, learning Python to fulfill another purpose, such as taking a course that requires it, is fine. Need driven learning, as it were. But you have only written small (tiny, actually) programs in Java, certainly too small to teach you the advantages of OO ...


1

I've tried running some demos before starting class and collecting preferences of different children. The list of demo programs is here https://gist.github.com/danbst/ae4fd7cbb1ea97d5efbc80bd06b50075, all of which can run out-of-box on any python installation (with tkinter). Of those the most complicated is Minesweeper using TKinter https://bit.ly/2ViDFAP. ...


Only top voted, non community-wiki answers of a minimum length are eligible