simply me & what I do in IST...
no taxing aiights. :)
cos i have machine guns! xD
02.05.95
cmac10'ster.
[EST. 210307]
i❤youuuu.
&& thats me.
As I said in one of my previous posts I would complete the Random Number Generator Task that I started. Though the activity has changed a little bit from the original task which was way easier, and now works similar to happy or sad but instead we're using the heads or tails of coins.
So I've created a program that when the "random" button is clicked, a 0 or 1 appears in the textbox below it and if the number is 0, the heads coin appears as an image and the same with tails for when 1 appears.
- Interger Data Type- Displays a whole number.
- Randomise- Starts the random number generator.
- Rnd- Makes a random number.
The event used in this task is the click function, the properties used are the codes of the button, textbox and pictureboxes and the objects that were used were a button, a textbox, two pictureboxes and a label.
Below is a screen shot of the program when it's run;
And here is the code that I used to construct the program;
This activity works with variables which are “containers” for values that can be used by a program. Variables can contain numbers or text. Variables are given names so that they can be referred to in the programming code.
In this task we created three variables called "point", "number" and "name".
- String- A is a type of variable that is worded.
- Decimal- A decimal is a variable in decimal form.
- Interger Variable- A whole number.
The event used was the click function and the properties used were the coding of the buttons, textbox and pictureboxes. The objects used were the buttons, textbox, pictureboxes and label.
Below is what the program looks like when it's run;This is the code that I used;
This is the code used for the program;
In this task we created a basic program on heads and tails, though once you enter heads it will always show "win" and once you put in tails it will always say "lose". This application is an examples of "Selection and Repetition".
Examples of objects in this application is the form and the button. Examples of properties in this application is the code behind the functions of the program. An example of an event in the application is the cursor which initiated events when something is clicked, such as the button.
This is what the application looks like;
Also if you happen to misspell heads or tails and click CHECK, then the program will not work, the same goes for capitalised words. In order to avoid this, the use of "radio buttons" would be better.
An example of the new application and code is shown below;
So today we're learning about how to use Visual Basic and it's features in a step by step tutorial led by Mr. Lennon. It's way more interesting learning this way than watching those boring videos, but I guess I still prefer to learn by experimenting and exploring. This task is also known as the "Hide and Seek" task.
Basically we've constructed a very very basic program with buttons, customised backgrounds and fonts and all the basic stuff in preparation for our next assessment.
Here's a print screen of the design view that I'm working on at the moment. Haven't finished yet though.
Here are the words for my IST vocab for the day:
- Objects- Objects are the building blocks for programs. They are a piece of code that can be edited and used over an over. Examples of objects in Visual Basic are controls and forms.
- Events- A message sent by an object announcing that something happened. This can be initiated by function pointers like a mouse click over the object.
- Properties- Properties allow the program to understand what to do or how to set up a page.
More words might be added later, but this is just showing where we're at now.
Thank You.
[Also I realise I said I'd post that activity on Random Number Generators and I'll do that in my spare time.]
Today I installed Visual Basic 2008 Express Edition on the computer I'm on and I've started to watch the epically long tutorial video. I'm about half way through and I'll be finishing up soon.
I've taken a look at the next activity after all the tutorials called, Random Number Generator. I started some work on it today, so I'll continue to finish it off and post about it on my blog next lesson.
Thank you.
Solving a problem often involves making a decision between two or more options. In an algorithm this process of making a decision is called selection.
Describe, in plain english, an algorithm for;
1. Moving through a set of traffic lights.
2. Deciding whether to take an umbrella to school.
3. Giving a student an A, B or C on their test
Moving through a set of traffic lights:
1. Approach the traffic lights.
2. If the light is green then proceed in the direction you intend to go in. If the light is yellow then slow down and prepare to stop (or as other people say, "speed up") If the light is red then stop at the line at the traffic lights.
3. After stopping at red, when the light turns green, proceed in the direction intended.
Deciding whether to take an umbrella to school:
1. Go outside and look at the sky. Check for for dark cloud cover.
2. If there is dark cloud cover, bring an umbrella with you.
Giving a student an A, B or C on a test:
1. Use the marking criteria to allocate marks.
2. Add up marks in each section and whichever has more marks is the correct grade.
Often an algorithm will often require you to repeat a task in order to solve a problem; when this is done in an algorithm the structure is called repetition.
Describe, in plain english, an algorithm for;
1. Adding the correct amount of cordial to water to make a drink.
2. Filling a bucket with water.
3. Blowing up a balloon.
Adding the correct amount of cordial to water to make a drink:
1. Add the directed amount of water as specified by the bottle of cordial.
2. Add the directed amount of cordial as specified by the bottle of cordial.
Filling a bucket with water:
1. Place an empty bucket under a tap.
2. Open the tap and let the water fill the bucket.
3. When the bucket is filled to the desired amount, close the tap.
Blowing up a balloon:
1. Stretch the balloon and place the end between your lips with the hole in line of your blow.
2. Blow into the balloon until the balloon expands to its full potential.
Tatjana's Blog: Tatjana in IST.