5 more posts in this thread. [Missing image file: 1335469973446.jpg]
Horrible programming student here.
I have to make an 8x8 checkerboard using python & this graphics module a professor made.
As of right now this is what I have
from cs1graphics import *
paper = Canvas(400,400)
blackSquare = Square(50, Point(75,25))
I know I need to use the modulus operator (%) within a loop to make it so that it inserts a black square in every even square, but I can't think of how to do this shit to save my life right now.
After I put down the squares in a loop I have to actually put checkers on the image, but I think after I actually understand how to loop in the black squares I'll understand how to do that.
10 more posts in this thread. [Missing image file: chem e.jpg]
Is chemical engineering a very stressful job? I'm pursuing it, but I have generalized anxiety disorder and can not handle high stress levels at all. Should I switch to comp sci? I've been considering that due to low stress levels, but chem E has better wages, better hiring outlook, and is more interesting to me. Difficulty understanding the material is a non-issue for me, the problem is with large workloads and deadlines.
6 more posts in this thread. [Missing image file: python_logo.jpg]
I'm a beginner in Python. I need to make a program that counts the number of alliterations in a sequence of words. For example,
["frog", "friend", "cat", "apple", "asthma"] would count 2. How do I do this? What functions should I be looking at?