string manipulation

string manipulation

Post removed; spoilers
karom
New User

Posts: 2
Joined: Sun Jul 10, 2011 3:38 am
Blog: View Blog (0)

Re: string manipulation

Better than saying "Here is code... Fix it for me!". It would be better if you described even briefly the answers to these questions:

1) What is it supposed to do?

2) What is the expected output?

3) What are any known issues? (if there are any)

You'll find people (eg, me) more willing if you put a little more effort into the question.
Assassian360
Poster

Posts: 135
Joined: Sat Jun 26, 2010 1:37 am
Blog: View Blog (0)

Re: string manipulation

I thought the code does the right thing.
This level is about string manipulation.
In this challenge, you will be given a string. Take all the numbers from the string and classify them as composite numbers or prime numbers. You should assume all numbers are one digit, and neither number 1 nor number 0 counts. Find the sum of every composite number, then find the sum of every prime number. Multiply these sums together. Then, take the first 25 non-numeric characters of the given string and increment their ASCII value by one (for example, # becomes \$). Take these 25 characters and concatenate the product to them. This is your answer.

Output: zdvxmko@iksz\$lmqyfow@tevv101528
Code: Select all
`zdvxmko@iksz\$lmqyfow@tevv101528oc{lujxdpb%jvqrt{luruudtx140224`

What is the expected output? The correct answer
What is it supposed to do? It should output the answer
karom
New User

Posts: 2
Joined: Sun Jul 10, 2011 3:38 am
Blog: View Blog (0)

Re: string manipulation

karom wrote:What is the expected output? The correct answer
What is it supposed to do? It should output the answer

No shit.

karom wrote:I thought the code does the right thing.

From this alone, I'm going to assume you probably found this code online from Google or something and decided to test it out. You don't even attempt to tell us anything, and you're being excruciatingly demanding. This is a turn off for people who would want to help you, like me and Assassian. You in no way even try to tell us what language you supposedly wrote this is. You probably don't even which one it is.
You give us no information, and demand an answer. I'd be more than willing to help if you asked for specifics. But like Assassian said nicely, we're not your bitches.

mShred