|Apr 7, 2012, 06:47 PM||#1|
Raptor and reversing a sting???
I have to submit code for my class where I design a program that prompts the user to enter a string and then displays the string contents backward. For instance, if the user entered "gravity" the program should display "ytivarg." I have the python code done. To reverse the word I used, word = raw_input, then print word [::-1]. But I can not figure out how to make it work in Raptor. I don't know the language to use to make it reverse a string. Any help would be appreciated as this assignment is due tonight! Thanks!!
15" 2.7GHz Core i7 Retina MacBook Pro (Early 2013)
Silver iPhone 5s, Space Gray Retina iPad mini
27" LED Cinema Display, iPod Collection, ATV3
|Apr 7, 2012, 07:54 PM||#2|
First off, Python basically 'cheats' at this so just because you can do it in Python doesn't mean you've mastered the concept of reversing a string. Most languages don't have a built in function that will do it without thinking about it.
Secondly, what is 'Raptor' all I can find is some kind of flow chart language which seems like it can't be right.
EDIT: Actually this probably is the 'Raptor' you're referring to. You need to think of what is actually required to reverse a string. One way would be to use a concept of a stack or recursion. Another way would be to use built in string language constructs that prepend strings if available.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|Reversing Motion Titles in FCP||RoverStar||Digital Video||2||Apr 25, 2014 05:21 PM|
|OS X: EURO TRUCK SIMULATOR 2 - Reversing tips||DeafRaiders||Mac and PC Games||1||Mar 23, 2013 02:52 AM|
|AT&T Not reversing my upgrade||ricanloveee||iPhone||0||Sep 24, 2012 12:42 PM|
|Reversing an app update||achtungfemme||iPad||1||Aug 27, 2012 04:50 PM|
All times are GMT -5. The time now is 03:47 AM.