We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hello I was originally in a history class and i switched it out about 4 weeks int school for a intro to computer programing class, lets just say they were so far ahead of me already i knew there was no way of me catching up and learning the materiel to be able to do what i needed to. if anyone is willing to take time to help me get my projects finished i would be grateful. i have told my dad about this and there is no possible way to get a decent grade for me. i know i wont pass this course with out "help". I have asked the teacher for help and he simply does not supply the answers i need. we are already in the second term and i have the knowledge of someone who just started. Ive bull shited my way through the other projects, but now things are getting to test our knowledge on the course and i will fail with out some miracle. if there is anyway someone gets the time to help me with my problem like i said you would be a miracle.
Answers
Let's start with the basics then! How do you bake a cake? A good start would be to find a cookbook that has the directions you need to bake a cake. Once you have a cookbook with directions to make the cake, all you need to do is follow the directions. Here is what my cookbook says:
(NOTE: NOT A REAL RECIPE - DO NOT ATTEMPT TO COOK)
Programming is a lot like cooking. The difference is that you need to supply the recipe for the computer to follow. The computer, however, is a lot more clueless than a cook, so you have to give it VERY exact directions. For example:
The trick is to know what you want your computer to do, and then to give it the right directions to do that. If it does the wrong thing - that is, it does something that you didn't want - then it's your fault for telling it the wrong directions!
More coming...
(REAL CODE FROM THIS POINT ON - FEEL FREE TO COPY ANY CODE BLOCK INTO PROCESSING EDITOR AND RUN THEM!)
So let's start with some basic directions. First, we'll start with a command that prints out a string.
Notice that the direction is to PRINT a LiNe that says "Hello World!". Note also that this direction ends with a semicolon;
Now we'll do the an if statement. This tells the computer to do something IF some conditions are met.
Next, else. This does something ELSE if the conditions are not met:
More coming...
Computers are very good at remembering things, but only if you tell them to remember them properly! Here's some code to tell the computer to remember a number, a decimal number, a single letters, and a whole bunch of letters:
Computers, unlike cooks, are very good at doing the same things over and over. The hardly even get tired! You can make computers do the same things over and over using loops. Here is a while loop:
Whoa, what's that?!? That looks like a real sentence, not a direction! And the computer didn't even notice it! That's a comment - think of it like a note left in the cookbook to remind you of something, but since it's not part of the directions, the computer ignores it.
More coming...
Processing has a few functions built-in that are useful. The two main ones are setup() and draw(). Think of these as groups of directions - each is its own recipe - that the computer is going to make. It makes setup() just once, first. It then makes draw() over and over, as fast as it can.
That's it! Basics covered. Now muck about for a hour with that, read the reference, and try to write some of your own recipes... er, code. I'll be back in a hour to see where you're at.
Gone fishing... back in an hour...
Hey TFGUY I really appreciate you helping out like this. Azael, would you like to join our programming group? There we can help you out, do your projects as a group, and guide you just like tfguy is doing. Then you can be including in producing software and games. What do you say? If you're interested email here: portalswwd@gmail.com
hey, buddy, we're here to help you!
I'm also in this programming group TechWiz told you about.
Besides, did you do the first 6 tutorials?
They are great!
And then, it's all about practicing. When you like plan 2 hours of programming every second day, you'll soon be ahead of the crowd.
Best bring an example program you have issues with.
Or we give you a task like tetris or so.
Chrisir ;-)