generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: PYTHON (Please help)

Previous Thread :: Next Thread 
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 08:38 PM
if u have python knowledge I need help

username = input("Hey, What's your name?")

i = 0
for i in range(0, len(username)-1, 2):
print(username[i + 1] + username[i])


so lets say your say your name is

Jack

itll output

aj
kc

like the second letter then first
new line 4th then 3rd.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 08:43 PM
1
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 08:43 PM
username = "Jack"
s[::-1]

Now that it's reversed all you need to do is get the first two and last two letters with string.find.
Report Abuse
Kutoru is not online. Kutoru
Joined: 22 May 2016
Total Posts: 288
06 Oct 2016 08:44 PM
Dude you seriously need to start learning stuff yourself
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 08:46 PM
Better yet:

Username = "Jack"[::-1]
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 08:47 PM
You need to learn how to do stuff in steps then you can create the function that'll do it in the steps that are in the most logical order.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 08:49 PM
Dev, What if the name isn't Jack and it's Jackie.

6 letters.
I want it to work with any name.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 08:49 PM
And to find the half of each word just do word len/2 and or modulus so it'll return the end parts in case it's an uneven word.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 08:52 PM
Dev, I am still learning python and almost completely clueless.

I literally know more LUA than Python,

and you know my LUA knowledge is mediocre.


:L

Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 08:54 PM
I am just so confused on where to start honestly.
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 08:57 PM
What we are doing isn't syntax based it's common sense for all coding languages.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 09:00 PM
did I mention how dumb I am
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 09:02 PM
No need to, I can see that by what you're asking and saying.

Step 1: Reverse string.
Step 2: split string in half and account for uneven strings as you can't cut a letter in half.
Step3: decide where to put the extra letter. (On what output.)

And that should be done...
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 09:03 PM
I'd do something along the lines of len/2 and using modulus for getting the remainder.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 09:07 PM
welp now im confused cause the play button is grayed out, I got a python console open for testing but I can't test cuz the play buttong rayed out

any ideas
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 09:11 PM
forget that Illl use the other console.

So the code I got now,


If I type gray in for the input

it does
rg --- good

then ay but I wanted ya

and I have no clue
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 09:15 PM
##################################################################################################################################################################################################################################
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
06 Oct 2016 09:17 PM
Welp I tried to give you the answer in lua but it censored it. Anyways I pretty much told you how. AND STOP SENDING ME MESSAGES OR I'LL BLOCK YOU.
Report Abuse
Randy_Moss is not online. Randy_Moss
Joined: 05 Aug 2009
Total Posts: 30511
06 Oct 2016 10:21 PM
I mean u can reply to a message, i thought u were a nice person and i helped u witha trade wowowow
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image