Computer Science Canada Need Basic help on a turing program!!! |
Author: | Tubby_Kat [ Mon Apr 06, 2009 8:24 pm ] |
Post subject: | Need Basic help on a turing program!!! |
Can anyone explain to me how to make function and procedures that could be relavant to this problem? ![]() Also how can you express your final answers as reduced fractions and allow each fraction to be entered as a single input (allowing the user can type "5 / 3" as their first fraction). Thanks for reading my post! I know you guys can help!! ![]() |
Author: | Tony [ Mon Apr 06, 2009 8:51 pm ] |
Post subject: | RE:Need Basic help on a turing program!!! |
There are tutorials on functions available via Turing Walkthrough. Reduction of fractions requires factorization. |
Author: | Tubby_Kat [ Mon Apr 06, 2009 9:03 pm ] |
Post subject: | Re: Need Basic help on a turing program!!! |
factorization? how do I use that with function. I know what it is and how to use it with smaller programs, but how do I do it with fractions? And reducing those fraction? ![]() |
Author: | Tony [ Mon Apr 06, 2009 9:10 pm ] |
Post subject: | RE:Need Basic help on a turing program!!! |
ehh... integer factorization, or prime decomposition, whichever name you know the concept by. |
Author: | Tubby_Kat [ Mon Apr 06, 2009 9:27 pm ] |
Post subject: | Re: Need Basic help on a turing program!!! |
Okay...but how am I suppose to use that into a function? Can you just explain how the function show look like, and how I'm suppose to write the integer factorization in turing code? >____< (just in words) |
Author: | Tony [ Mon Apr 06, 2009 9:46 pm ] |
Post subject: | RE:Need Basic help on a turing program!!! |
do you know how to reduce fractions on paper? |
Author: | Tubby_Kat [ Tue Apr 07, 2009 5:33 pm ] |
Post subject: | Re: Need Basic help on a turing program!!! |
Yes, I do. But how am I suppose to convert that into code? And with a function! |
Author: | andrew. [ Tue Apr 07, 2009 7:39 pm ] |
Post subject: | RE:Need Basic help on a turing program!!! |
Try writing the steps down on paper. Then write that in Turing. After that, it should be simple to turn it into a function. |
Author: | Dusk Eagle [ Tue Apr 07, 2009 11:24 pm ] |
Post subject: | Re: Need Basic help on a turing program!!! |
Basically what Tony and andrew are saying is that there isn't one easy built-in way to solve a problem. The point of this assignment is to get you to think through how to do this problem yourself, and that's why no one is helping you with the actual logic. Similar to what andrew said, write a way of solving the problem out step-by-step on paper, then translate those instructions one at a time into Turing. That should make it far easier to solve this problem. |