The teaching of BASIC should be rated as a criminal offence: it mutilates the mind beyond recovery.
print "Enter a number"That's not good Python, but it works fine. The input() syntax is a little different than BASIC's, but it's not that big a deal, and it's in some ways more straightforward -- Python makes it obvious that you're assigning a variable to the result of input(), while BASIC's syntax IIRC does the assignment more implicitly ("INPUT a"). But like BASIC, you can work directly in the interpreter if you want.
A = input()
print "Enter another number"
B = input()
print "The sum is:"
print A+B
IF statements to determine if my sprite was slamming into my predefined walls (or dropping into deadly spike-filled pits. represented by a box with a ^ in it, of course). Finally, I realized that I could draw my map out to the screen at the start and then use the video buffer to check for walls rather than hit all of these checks in what was actually doubly-interpreted BASIC. It blew my little preteen mind when I realized this was an option and suddenly my game became playable with more than a few walls in place. GOTO forever: haters gonna hate.We speak of “playing” a violin, not “working” it. While music making entails a tremendous amount of work, it has to look like play, even to feel like play, if the musician is ever to survive the ordeals of practice and rehearsal (not to mention the privation of working for little or no pay). If using a computer program feels like working in a bank or a hamburger chain restaurant, musicians won’t (and shouldn’t be asked to) do it. [pdf]posted by weston at 11:28 AM on June 22, 2010 [1 favorite]
« Older Sci-Fi Airshow - Take the guided tour.... | Neil Cicierega may be responsi... Newer »
This thread has been archived and is closed to new comments
Actually, that might not be such a bad idea for a ....
I have to go.
posted by Michael Roberts at 7:42 AM on June 22, 2010 [3 favorites]