3 ms·
I'm not sure about that. I think that for teaching, you can go too far and eliminated too much friction. In python in particular, there's all this type stuff g
by jppittma 3y ago
I'm not sure about that.
I think that for teaching, you can go too far and eliminated too much friction. In python in particular, there's all this type stuff going on under the hood that's absolutely critical in understanding what the output of your program is going to be, but nowhere in that program is it explicit what that type information is.
It's easy enough to keep track of that in your head once you've mastered the concept, but for a true beginner, I think
int x = console.nextInt();
String operation = console.next();
int y = console.nextInt();
is probably better suited for helping you get your bearings than having to figure out why you have to cast x and y after doing
x, operation, y = input().split()