Posted: Wed May 03, 2006 12:49 pm Post subject: Turing practice contest!
Alright this is a small contest to get you all prepared for another contest I am holding in about 6-10 months. The bigger contest offers a cash prize to 1st 2nd and 3rd place winners, that of which will be determined soon. It might be free, I am not sure yet. Anyways, this is just a practice contest, which will run almost exactly as the real thing. Here are the rules:
1. You may choose one ore more of the following codes to do, but only ONE entry per person per code.
2. You will eiter pm, email, or post the source code here, if there are two identical soure codes, I will take the first one posted/submitted.
3. Each of the following questions states the bare essentials of what you must have in the program, but feel free to ad things, which may or may not give you the extra points to win.
4. I will be judging the work by the following format:
Each number is a percentage...
Accuracy for the question: /45
Style of writng and style
of program in general: /25
Overall look, feel etc
of the program /20
Extra and other accesories /10
You may do one or all of the programs, but once again, only ONE entry per question.
*NOTE* Some questions require you to search in a specified folder or file, for these questions I will be checking the program with my own file of the same name. Basically, whatever the file is called, is what you must have the program locate.
1. Write a program to divide a class of students into two groups: those whose last names begin with A to H and those that begin with I to Z. Your program will read the names from a data file named "Student-names.dat". The program will also count the number of last names in the first part of the alphabet and the number of last names in the latter part. The program must also print out the data file and then print out the number of last names in the first and last part of the alphabet.
2. Write a program to classify athletes into three classes by weight. The categories are: over 80 kg- heavyweight, between 60 and 80 kg - medium weight, and less than 60 kg - lightweight. Prepare a program so that a team of 10 athletes can enter their name and weight. The program will print out the name and the classification of each athlete. The program will then summarize and print out the number of athletes in each category. The program will read data from a data file named "athletes.dat". The data file is structured so each line of the data file contains a last name, a first name, and the weight. There are 10 lines to the data file.
3. Write a program to display a multiple choice question with five different answers on the screen and then depending on which answer is chosen give a different comment. For example, your question might be
TURING is
(a) a great programming language
(b) a kind of car
(c) a mathematician
(d) a machine
(e) all of the above
The choice will be a letter from "a to e"
If (a) is chosen then a response could be "You are absolutely correct".
If (b) is chosen then a response could be "Try again", etc.
4. Federal income tax is to be levied in stages on taxable income. On the first $27,500 you pay 17%, on the next $27.500 you pay 24%, and on the rest you pay 29%. Write a program to read in a taxable income from keyboard and computes the federal tax payable to the nearest cent.
Modify this program to read or input the information from a data file named "Taxable-income.dat". The data file is structured so that it contains the last name of the person and then the taxable income of that person. The data file contains 15 such names.
5. Write a program to read in a series of positive integers and output the range of the integers, that is, the interval from the smallest to the largest. The integers are stored in a file named "Intergers.dat". The data file is structured so that there are 5 lines of data and each line has 8 integers on it. Each line of data represents a series.
6. Compute values of the function
f(x) = 3 x2 - 2 x + 1
In steps of 0.1 between x = 0 and x = 1 inclusive and find the value of x for which f (x) is a minimum.
7. Write a program to draw a red box on a blue background using pixel graphics.
8. Write a program to draw a funny face on the screen with its center at any point you specify. Make the face 50 pixels in diameter. Write the program so that the user can input the color of the face and the background colour from keyboard at the same time as the location. Refuse to construct the face if the proper input is not entered. Such as pixels are off the screen.
9. Write a program that displays a bouncing ball on the screen. The ball will bounce off the four edges of the screen. Use pixel graphics for this program.
10. Draw a ball in motion starting at the top of the screen so that its centre moves to the position it would move to under gravity in each step of the animation. The equation for the y-coordinate of the centre is
Y = ymax - ( ½ ) * a * t ** 2
Where a is the acceleration of gravity, namely 32 m sec -2, and t is the time in seconds. If each pixel in the y-direction represents 1 meter choose an appropriate time scale to watch the motion: real time, in slow motion, and in time-lapse motion.
Remember, the real contest will have much harder questions, as a cash prize will be awarded, this is just to brush up your skills.
*IMPORTANT* The winner(s) of this contest will have an automatic entry into the realy thing, as the real contest will have a LIMITED number of seats of entry.
GOOD LUCK!
Sponsor Sponsor
Dan
Posted: Wed May 03, 2006 1:10 pm Post subject: (No subject)
This sounds more like you whonting to get us to do your home work then a contest. It has been pointed out that you have a hisotry of doing such on this site and i should warn you that if you keep doing such it could reloste in bad things like geting your acount baned.
We will not tolarate such scams being posted on our site, please take it some where eltes.
THIS IS YOUR LAST WARNING
Computer Science CanadaHelp with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
codemage
Posted: Wed May 03, 2006 1:16 pm Post subject: (No subject)
You tell him. If I'm going to do your homework, I at least expect to be paid a definite amount.
...and Turing is only a car if you read the question orally. A bit ambiguous.
PJ_69
Posted: Wed May 03, 2006 7:31 pm Post subject: (No subject)
I do admit that I have asked for help in turing for school, but this has nothing to do with my computer class. If you want to know the truth, I am required to do this for a special course I am currently takeing, in which I am required to make a contest. I shall not bore you with the details, as they are fairly long, but know this, the contest is true, and the reason that I picked turing is because as they say "I am killing two birds with one stone" I am trying to learn turing more, as I am in a very basic leveled class, and trying to do my project. How I got these questions you may ask? A simple question for my teacher solver my problem.
Anyway, if you don't bieleve me, fine, but remember, as I mentioned before the winner(s) of this contest will have an automatic entry into the real contest offering cash prizes. (THe money which was donated by the teachers family membber)
[Gandalf]
Posted: Wed May 03, 2006 7:39 pm Post subject: (No subject)
The best lie is a half truth, or so I am told.
Who can say for sure, though. And it's not my decision to make either way, so... great! You should be more specific on these prizes though...
PJ_69
Posted: Wed May 03, 2006 7:47 pm Post subject: (No subject)
[Gandalf] wrote:
The best lie is a half truth, or so I am told.
Who can say for sure, though. And it's not my decision to make either way, so... great! You should be more specific on these prizes though...
That all depends on how succesfully I format my contest. It also depends when I, and the rest of the people in the course, finish the contest(s). If I am one of the top three, the cash will be plentiful, below three, slightly less. But expiriencing the reaction of the other people, I wouldn't excpect anything good to come from them...
chrispminis
Posted: Wed May 03, 2006 9:34 pm Post subject: (No subject)
Haha, Peter!! Or Pigger? Hoofshake.
This is clearly a hoax to get your homework done. I'm in your claaaasss! If anyone's unsure look at #7 and tell me if that's a contest question.
Elaborate scheme though, too bad I'm here to defend against the evils of fat people and plagarism.
PJ_69
Posted: Wed May 03, 2006 10:07 pm Post subject: (No subject)
chrispminis wrote:
Haha, Peter!! Or Pigger? Hoofshake.
This is clearly a hoax to get your homework done. I'm in your claaaasss! If anyone's unsure look at #7 and tell me if that's a contest question.
Elaborate scheme though, too bad I'm here to defend against the evils of fat people and plagarism.
Yeah, number 7 is a freebie to see if anyone would be creative enough to add things. Also, wtf? I have no idea who you are, maybe you have me confused with someone else, and...are you high?
Sponsor Sponsor
do_pete
Posted: Wed May 03, 2006 10:21 pm Post subject: (No subject)
Out of curiosity, what course are you saying this is for?
Tony
Posted: Wed May 03, 2006 10:23 pm Post subject: (No subject)
I could actually confirm that PJ_69 and chrispminis are in fact from the same school
Posted: Wed May 03, 2006 10:25 pm Post subject: (No subject)
Tony wrote:
I could actually confirm that PJ_69 and chrispminis are in fact from the same school
We might, we might not, what does that have to do with anything? There are thousands of people at my school, he may be one of them, but that doesn't mean I know him. I don't know everyone at my school.
Tony
Posted: Wed May 03, 2006 10:51 pm Post subject: (No subject)
PJ_69 wrote:
that doesn't mean I know him
you don't have to. He has to know you and/or be familiar with your homework assignment