Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Help with smiley face? PASS OR FAIL SITUATION!!!
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Turing_Sucks




PostPosted: Wed Jan 07, 2009 9:10 pm   Post subject: Help with smiley face? PASS OR FAIL SITUATION!!!

So I'm getting 40 something percent in my programming class. It's my final year of high school (grade 12) and I can't afford a failed credit. My teacher told me I can submit some of the programs I didn't get finished (mainly due to the fact that I joined the class 3 weeks late). Now my problem is that I don't really know what I'm doing... I have asked my teacher for help, but I'm too busy working on my other, more recent programs for submission. So I decided to give this site a try.

So here's one of my programs.

Step 1. Write a program that uses a procedure called draw that draw a happy face. Allow the user to specify colour, coordinates, etc.

Step 2. Add a second procedure to your program that will accept the faces center coordinates and its radius. It should then call the draw procedure using these same values to draw the face in the background colour.

Step 3. Add a third procedure called slide to your program which will animate the face either up, down, left or right. Allow the user to specify the direction, number of steps, the length of each step (in pixels) and the delay time for each step. Make slide call draw and erase.

This is what I have got so far and I would REALLY appreciate it if someone could help me find my errors and correct them. I am really bad with this stuff and ANY help at all would really help me out (it's a pass or fail situation!!!). Thanks a lot in advance.

EDIT:
I'm typing this on my Mac (I'm in a Mac family) and cannot open my turing file to paste the code in this post. I will post the code asap as soon as I gain access to a P.C.
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Wed Jan 07, 2009 9:26 pm   Post subject: RE:Help with smiley face? PASS OR FAIL SITUATION!!!

You can open the .t file in whatever MacOS uses for a text editor. It's a plain-text file. In Windows, you can open it in Notepad, for example.

I am awaiting code Smile
corriep




PostPosted: Wed Jan 07, 2009 9:32 pm   Post subject: Re: Help with smiley face? PASS OR FAIL SITUATION!!!

For one if your looking for Turing on a PC, I would look into Crossover, you can get a 30 day trial.

To start with the problems, do you know how to use a procedure with arguments? If not heres a quick example:

Turing:

procedure putThis (whatToPut : string)
    put whatToPut
end putThis

putThis ("Hello, World!")


The output would be hello world.

You could use integers instead of strings in your procedure and use drawfilloval for the face and drawarc for the mouth. If you want to learn how to use any of these just press F10 in turing for the help.

Hope this helps.
Tony




PostPosted: Wed Jan 07, 2009 9:38 pm   Post subject: Re: Help with smiley face? PASS OR FAIL SITUATION!!!

A few points:

- In this case it's not Turing that "sucks", but your lack of understanding of the tool you use. A change in your attitude will go a long way towards improving your mark.

- Your teacher is making special accommodations for you to improve your grade, but you need to put in more effort yourself as well.

Turing_Sucks @ Wed Jan 07, 2009 9:10 pm wrote:

I'm typing this on my Mac (I'm in a Mac family) and cannot open my turing file to paste the code in this post. I will post the code asap as soon as I gain access to a P.C.


- Turing files are text files, you can open them with any text editor of your choice (TextEdit has got to be installed on your system by default).

It sounds like you are not putting any time at all into this class at home (you know how other classes have homework?). Turing runs very well through CrossOver -- http://compsci.ca/v3/viewtopic.php?t=19506

- And finally, we don't actually debug your code for you. Though you are encouraged to ask throughful questions, and we will often point you in the right direction.

I think the absolute best thing you can do is to get Turing working on your computer at home, and put some time into catching up with the use of the language, via Turing Walkthrough
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Turing_Sucks




PostPosted: Thu Jan 08, 2009 1:25 pm   Post subject: RE:Help with smiley face? PASS OR FAIL SITUATION!!!

Thanks Tony and everyone else for the advice. I just want to be pointed in the right direction as you said. You are wrong about me not putting any time at all into this at home. I've been working on a lot of my programs at home (the ones everyone else did before I joined the class) I just need to be "pointed in the right direction" so I know what to do next. I'm sorry if you're offended by my name... I've just been very frustrated with the class lately (my mark went from a 60 to a 43 over the past 2 weeks?). I have been reading the tutorials and will continue to do so. Now I just need to get my USB back (I left it in the school computer by accident) and I will show you guys what I have so far.
Amit




PostPosted: Thu Jan 08, 2009 8:30 pm   Post subject: Re: Help with smiley face? PASS OR FAIL SITUATION!!!

Sorry if this is a little off topic isn't Turing a little basic for a Grade 12 programming class? I always though that you used programs like Java or C in Grade 12. Is this usual?
syntax_error




PostPosted: Thu Jan 08, 2009 8:48 pm   Post subject: Re: Help with smiley face? PASS OR FAIL SITUATION!!!

Amit @ Thu Jan 08, 2009 8:30 pm wrote:
Sorry if this is a little off topic isn't Turing a little basic for a Grade 12 programming class? I always though that you used programs like Java or C in Grade 12. Is this usual?


Depends on your school, best way to know: ask.
Tony




PostPosted: Thu Jan 08, 2009 8:59 pm   Post subject: Re: Help with smiley face? PASS OR FAIL SITUATION!!!

Amit @ Thu Jan 08, 2009 8:30 pm wrote:
Is this usual?

This isn't usual, but Turing allows for much of what one might want to teach at a high school level anyway.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Thu Jan 08, 2009 10:00 pm   Post subject: RE:Help with smiley face? PASS OR FAIL SITUATION!!!

And as an added bonus, most Ontario schools have textbooks for it (I'm not sure about other provinces).
Turing_Sucks




PostPosted: Wed Jan 28, 2009 2:30 pm   Post subject: Re: RE:Help with smiley face? PASS OR FAIL SITUATION!!!

Euphoracle @ Thu Jan 08, 2009 10:00 pm wrote:
And as an added bonus, most Ontario schools have textbooks for it (I'm not sure about other provinces).

Just wanted to add that I passed the course so no worries Cool. Sorry for making this post as it was kind of useless, but w/e. Peace guys.

BTW, our school doesn't have textbooks for it, but I wished we did...
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: