536 Comments - Last post 48 minutes ago by DazeTheBearChieftain
5 Comments - Last post 1 hour ago by jiggakills
8 Comments - Last post 1 hour ago by SelectiveOblivion
3,900 Comments - Last post 1 hour ago by MeguminShiro
126 Comments - Last post 3 hours ago by Joseahfer
131 Comments - Last post 4 hours ago by DarthSidious
370 Comments - Last post 4 hours ago by Warriot
908 Comments - Last post 1 minute ago by FullMetalZ
20 Comments - Last post 7 minutes ago by shspvr
419 Comments - Last post 11 minutes ago by FullMetalZ
1,069 Comments - Last post 13 minutes ago by MrOuiOui
35 Comments - Last post 20 minutes ago by HappyCakeday
2,333 Comments - Last post 32 minutes ago by SINNEDUE
41 Comments - Last post 51 minutes ago by alpshrk
Hey, basically I'm just looking for people who understand python, and can help me with some comp science homework, I'm sort of stuck, and normally I'm good at figuring it out on my own but this assignment is just wrecking me, and it's supposed to be "easy" I can figure out the hard shit but this string shit is killing me, I just want to know why and understand how it works right now so if you don't mind helping me out that would be awesome, I'm using processing, because I'm in beginner computer science, and that's what they use.
giveaway: https://www.steamgifts.com/giveaway/zigEF/neko-nin-exheart
By the way you're all free to enter, I don't really care one way or another, I just was hoping that someone would see it who had a comp science background and wouldn't mind me pestering them with a few questions.
Edit again: This is the problem I'm having trouble with:
First the assignment: For this question, you will write a program that allows the user to type in a number on the keyboard. When the user clicks the mouse, the program will calculate and display the square of the number that was typed in (e.g. if the user types in the number 12, then when the mouse is clicked, your program will display the value 144, i.e. 122).
This is the part I'm having a problem with:
When the user presses a key: Add any key that the user types to your string of digits. If the user presses a key that is not a digit, it’s okay if your program crashes (adding error-checking is beyond the scope of this question). Always display the current digits that the user has typed in using the text() function.
Comment has been collapsed.