Computer Science Canada

Turing practice contest!

Author:  PJ_69 [ 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!

Author:  Dan [ Wed May 03, 2006 1:10 pm ]
Post 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

Author:  codemage [ Wed May 03, 2006 1:16 pm ]
Post subject: 

You tell him. If I'm going to do your homework, I at least expect to be paid a definite amount. Twisted Evil

...and Turing is only a car if you read the question orally. A bit ambiguous.

Author:  PJ_69 [ Wed May 03, 2006 7:31 pm ]
Post 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)

Author:  [Gandalf] [ Wed May 03, 2006 7:39 pm ]
Post 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... Razz

Author:  PJ_69 [ Wed May 03, 2006 7:47 pm ]
Post 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... Razz


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...

Author:  chrispminis [ Wed May 03, 2006 9:34 pm ]
Post 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.

Author:  PJ_69 [ Wed May 03, 2006 10:07 pm ]
Post 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?

Author:  do_pete [ Wed May 03, 2006 10:21 pm ]
Post subject: 

Out of curiosity, what course are you saying this is for?

Author:  Tony [ Wed May 03, 2006 10:23 pm ]
Post subject: 

I could actually confirm that PJ_69 and chrispminis are in fact from the same school

Author:  PJ_69 [ Wed May 03, 2006 10:25 pm ]
Post 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.

Author:  Tony [ Wed May 03, 2006 10:51 pm ]
Post 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

Author:  cool dude [ Wed May 03, 2006 11:18 pm ]
Post subject: 

Tony wrote:
I could actually confirm that PJ_69 and chrispminis are in fact from the same school


just out of curiousity how can u confirm that? Confused

Author:  Blade [ Wed May 03, 2006 11:20 pm ]
Post subject: 

cool dude wrote:
Tony wrote:
I could actually confirm that PJ_69 and chrispminis are in fact from the same school


just out of curiousity how can u confirm that? Confused


identical IP addresses?

Author:  [Gandalf] [ Wed May 03, 2006 11:22 pm ]
Post subject: 

Either an identical IP address or one in a very close range, depending on how your school has it set up.

The lengths that people will go to to get their assignments done for them... It would probably take shorter to just do it yourself. Eh

*edit* Too slow!

Author:  chrispminis [ Wed May 03, 2006 11:31 pm ]
Post subject: 

Naw, I never log on this site at school. I'm actually surprised to see Peter posting from his house. But yeah, you definetely know me.

Author:  Tony [ Thu May 04, 2006 12:03 am ]
Post subject: 

ok, what I saw as a common IP turned out to be some hickup on a backbone network that escalated to logging... for both of you.

Your home IPs are so redicilously close, that your ISP hubs appear to be sitting on the same rack.. somewhere in Etobicoke?

Author:  NikG [ Thu May 04, 2006 12:35 am ]
Post subject: 

I want to see how far he'll take this.
PJ_69 wrote:
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.
Please, "bore me with the details" about this special course.

Author:  Dan [ Thu May 04, 2006 2:14 am ]
Post subject: 

I whould alos like to know the details of such a corse and just how you plan on runing a contest with questions like that. Also if you could give us the name or your school, the corse number + name and the teacher supersvising it then maybe compsci.ca could help out promting your contest. Tho i find it unlikey that you whould be able to proived such since it is cleary fake. Tho i do give you marks for one of the most creative ways to getinging your home work done since the nerd rap guyl

Author:  PJ_69 [ Thu May 04, 2006 3:51 pm ]
Post subject: 

Nerd rap guy?

Anyways, I still see that I am getting 100% negative-ness from these forums. Once again, I do not know you, you must be thinking I am someone else, if you provide me with your real first name, and grade, I might know who you are.

Back to the topic: If you are still unsure about the contest, I can have my partner sign up to confirm the project. And just so you know I won't be trying to cheat, he can sign up at home, using a diffrent ip address.

The course that I am taking is a "expiremental" one. One of the teachers thought it would be cool to explore the "real life world" But in a compacted course, with everything mixed together. By "expiremental" I mean the school first needs to confirm the course is running well, before issueing any of the advanced stuff. People call this course many things, I prefer to call it "Life 101- A compacted course to teach you about life!" We do ALOT ALOT ALOT ALOT, of things in this courrse, and we are in a unit that deals with a little bit of financing, internet, advertising, communicating, etc. Thus, contests fell under most of them, and is a project.

Quote:
Please, "bore me with the details" about this special course.


By "bore you with details" I meant about the project, but oh well, here are some more details in a compacted outline.

Contest Project

You will be creating a contest based on what you have learned from this section of the course. You may choose ANY format you wish. You must set up your contest so it is accesible by me. Once everyone is completed there contest I will judge them, top three get the highest amount of money, the rest will get slightly lower amounts. This contest will be played out by people outside of this course, and money will be handed out to the people.

Marking Scheme (too much typing)

That is the basic outline typed by me, the real one is much more detailed.

Author:  cool dude [ Thu May 04, 2006 4:18 pm ]
Post subject: 

i highly doubt that an actual course that people pay money to take in the first place will pay u money for making a contest. LMAOF!!! Laughing dude get a life! even if it was for real no one will join such a contest that requires little skill to do. contests are meant for challenges! if u that desperately needed help with your homework which i presume than u could have posted it in the help section. u know we might believe u if u post an exe of each program u made showing us u did the work! but i don't think u have that because u r trying to get us to do it for u

Author:  PJ_69 [ Thu May 04, 2006 4:38 pm ]
Post subject: 

cool dude wrote:
i highly doubt that an actual course that people pay money to take in the first place will pay u money for making a contest. LMAOF!!! Laughing dude get a life! even if it was for real no one will join such a contest that requires little skill to do. contests are meant for challenges! if u that desperately needed help with your homework which i presume than u could have posted it in the help section. u know we might believe u if u post an exe of each program u made showing us u did the work! but i don't think u have that because u r trying to get us to do it for u


1. I did not pay for it, not the "expiremental"

2. Money was donated by teachers relatives

3. This is my first contest

4. If I would have made it too challening the teacher might have gotten mad.

Author:  zylum [ Thu May 04, 2006 4:50 pm ]
Post subject: 

Hacker Dan wrote:
I whould alos like to know the details of such a corse and just how you plan on runing a contest with questions like that. Also if you could give us the name or your school, the corse number + name and the teacher supersvising it then maybe compsci.ca could help out promting your contest. Tho i find it unlikey that you whould be able to proived such since it is cleary fake. Tho i do give you marks for one of the most creative ways to getinging your home work done since the nerd rap guyl


why dont you provide that information?

Author:  PJ_69 [ Thu May 04, 2006 4:57 pm ]
Post subject: 

I did provide all the info, except the following:

SChool: Humberside

Teacher: Mr.Voskowich

Since the course is not official, the code will be provided (if the course is succesful) next year.

Author:  do_pete [ Thu May 04, 2006 5:51 pm ]
Post subject: 

I bet the course code is TIK 201 Laughing

Author:  PJ_69 [ Thu May 04, 2006 7:06 pm ]
Post subject: 

do_pete wrote:
I bet the course code is TIK 201 Laughing


ummmm....no.

Author:  chrispminis [ Thu May 04, 2006 9:38 pm ]
Post subject: 

PJ_69 wrote:
do_pete wrote:
I bet the course code is TIK 201 Laughing


ummmm....no.


ummmm....yes.

lol. Pay me money pigger.

It's me Chris. Grade 10 blah blah, whos Mr. Voskowich?

Author:  Dan [ Fri May 05, 2006 5:23 am ]
Post subject: 

I just looked up the info on Humberside C. I. and they have no teachers or staff by the name Voskowich so......pwned.

Befor you go and say it is the wrong school, it is the only registed high school in your area by that name. And if you whont to tell me you are going to a high school that is not listed in goverment canada's recoreds then you are going to have biger problems then some turing home work come graduation.

Now futher more looking up the school borad they list all schools that offer progames/cores, ect that are spesahal/new/uniqice to the school. And there is no such progame listed. An idivaidal teacher can not make a corse nor can they give you credit for a corse or club they made up. Such desions are made by the school borad. And the school borad this school is in has no listings of such a progame or credited equlivent in any school never mind the one you listed.

So how do you expain the missing theacher, corse and infromation form both the school borads data and the schools web page and the school borads webpage?

Author:  PJ_69 [ Fri May 05, 2006 1:41 pm ]
Post subject: 

You seem to have some problems reading hacker dan, as I mentioned before, the course is still in the "expiremental stage" I know I will not get any credit for it, but as the teacher said "If they allow my course in the school, if the people who have taken it this year, take it next year, they will definetly get above 50 (a pass)" Are you sure you did not find him? What are your sources "Ratemyteacher" ? They are not very reliable, check again, maybe you or I mispelled his name, he might of used another name when going into the school, there are infinite possibilities. So as I said before, this contest is true, if you need more evidence, I will ask my partner to register here and verify it is true.

Author:  Tony [ Fri May 05, 2006 1:59 pm ]
Post subject: 

PJ_69 wrote:
What are your sources "Ratemyteacher" ?

how about your school's website?

It's not a misspelling.. there's noone even close to the name.

Having your "partner" register means nothing, as you can just as easily sign up for another account yourself. Here's a wild though, how about you get your teacher to post?

Author:  cool dude [ Fri May 05, 2006 3:20 pm ]
Post subject: 

u know wat would be funny if your friend chris shows your teacher how your trying to plagarize! Laughing i suggest to stop while your at it before one of the admins gets pissed off and contacts your school to tell your computer teacher mr.Swerdlyk, David that u r plagirizing your assignment and u get a zero. as i said again if it so happens u r telling the truth post all the answers as an exe file so we can see the code to show us u did it!

Author:  JT22 [ Fri May 05, 2006 6:56 pm ]
Post subject: 

Don't flame him. I'm his partner for the contest and I PROMISE it is legitimate. You want proof? Just check my IP address, it's completely different then his. So you know I'm not him that just created a new account just to post this. So please don't get mad at him.

Author:  cool dude [ Fri May 05, 2006 7:15 pm ]
Post subject: 

JT22 wrote:
Don't flame him. I'm his partner for the contest and I PROMISE it is legitimate. You want proof? Just check my IP address, it's completely different then his. So you know I'm not him that just created a new account just to post this. So please don't get mad at him.


firstly u could have went on another computer to post this! simple as that. Tony check area of IP. also fine tell me then why doesn't he post an exe version of all the programs? to host a contest u must be able to at least solve the problems yourself. well...

Author:  do_pete [ Fri May 05, 2006 7:58 pm ]
Post subject: 

JT22/PJ_69, what is the name of this "experimental" course? What kind of credit do you get? Why is there no course of that description on your school's website?

Author:  Tony [ Fri May 05, 2006 7:59 pm ]
Post subject: 

JT22 wrote:
check my IP address, it's completely different then his. So you know I'm not him that just created a new account just to post this.

IP just shows that the post came from another location. So we don't know it wasn't just him.. as you haven't said anything in your post but "hey, look at my IP"

How about
Tony wrote:

Here's a wild though, how about you get your teacher to post?

Author:  [Gandalf] [ Sat May 06, 2006 12:14 am ]
Post subject: 

Hahaha, his partner for what? Trying to get others to do your homework for you? Why don't you get the whole class to sign up and "prove" that you're telling the truth. Oh... but that won't make any difference.

cool dude, why don't you tell that teacher about compsci.ca, and 'nudge' him in the direction of this post. Wink

Author:  Dan [ Sat May 06, 2006 12:19 am ]
Post subject: 

PJ_69 wrote:
You seem to have some problems reading hacker dan, as I mentioned before, the course is still in the "expiremental stage".


I HAVE PROBLEMS READING? If you read my post at all you whould see that i was talking about how all new prgoames have to be put threw the school borad and that i check sorces such as the school borad, the school borads web page and your schools webpage and none of them have a teacher or any notice of a spesitaly progame or corse witch has to be listed if it is vaild.

Sine we like playing games, how about i take all your bits intill you can prove this contest is real and if you do i will give you double them. Also i will give you your rank back.

Author:  NikG [ Sat May 06, 2006 1:41 am ]
Post subject: 

PJ_69:
All this effort you're putting into this not-so-elaborate scheme would be much better spent learning turing and solving those problems.
Maybe you thought you were smart coming up with that whole story but, as you can see, all you're doing is risking being caught for cheating.

If you don't know how to solve the problems, at least give it a shot so that others will see that you're trying. If you don't even know where to begin, people here will definitely give you a hint or two, but perhaps you should be talking to your teacher because those problems are pretty simple.

Author:  codemage [ Mon May 08, 2006 8:02 am ]
Post subject: 

Here's some more ammunition for the stockpile:

Not only is there no Voskowich at that school... the licensing association for teachers (OCT) has no record of him in their database.

Either PJ can't spell the teacher's name, or poor Mr. V is teaching illegally without a license. We should inform the principal that there is a non-registered teacher conducting a non-registered course at his school.

Author:  chrispminis [ Mon May 08, 2006 9:35 pm ]
Post subject: 

Yeah, I already mentioned earlier that there was no Voskowich. Smile

Author:  scooter [ Wed May 17, 2006 1:25 pm ]
Post subject: 

hey pigger...sorry, i mean peter. this assignment is relatively easy to complete so i dont see why you need someone else to do it for you. I'm in compsci class right (TIK201 period H) now writing this and pigger (PJ_69) is sitting a few rows behind me. If you need any help come down to the bottom row where i am generaly on the computer at the very right. And if you continue being a fag then i'm just gonna go up there and beat the shit out of you Very Happy

Author:  Ubermensch [ Wed May 17, 2006 1:35 pm ]
Post subject: 

Lyke, omfg piiter (PJ69), i thot i lyke neu u, mann!!!11!11!11!11one. bitte ma thumm, omg lol

as 4 u scoooottt, lett the loord praize u n ur childrin.

Author:  PJ_69 [ Wed May 17, 2006 1:40 pm ]
Post subject: 

Lmao, this is such an old thread! Btw, yea, I am a fake! But I don't really care anymore because I already have 5/10 of the assignments done, and I am going to get the other 5 soon Razz...

Btw, for all you mods/admins, you can all go kiss my ass because you idiots cannot do shit to me! Since I did not plagerize anything yet, so screw you!

Author:  scooter [ Wed May 17, 2006 1:44 pm ]
Post subject: 

Dont worry everybody...although i'm prety sure pigger (peter, PJ_69) is suicidal, i'm going to comfort him now...he was so sure ppl were going to do his work for him Laughing

world peace
scooter (scott)

Author:  PJ_69 [ Wed May 17, 2006 1:48 pm ]
Post subject: 

Are you blind? I just said I don't really give a fuck that compsci members did not do my work, I already got all the work I had to have in, handed in.

Author:  scooter [ Wed May 17, 2006 1:57 pm ]
Post subject: 

great, now that you did the stuff you had to do you can finaly go home and suck your penis

Author:  PJ_69 [ Wed May 17, 2006 2:00 pm ]
Post subject: 

That post made the least amount of sense possible. I rather not suck my *****, I can't do that, and I have no reason to.


: