From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.42.158.67 with SMTP id g3mr21451411icx.18.1435585346083; Mon, 29 Jun 2015 06:42:26 -0700 (PDT) X-Received: by 10.140.101.22 with SMTP id t22mr155079qge.32.1435585346014; Mon, 29 Jun 2015 06:42:26 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!feeder.erje.net!1.eu.feeder.erje.net!news.ripco.com!news.glorb.com!j8no1680773igd.0!news-out.google.com!4ni23457qgh.1!nntp.google.com!j5no1164467qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 29 Jun 2015 06:42:25 -0700 (PDT) In-Reply-To: <24d183ce-77b6-4fe1-a95e-0ff5ef72c7bd@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=178.212.31.133; posting-account=nuF4hQoAAADjc2KKS1rOkzxWWEmaDrvx NNTP-Posting-Host: 178.212.31.133 References: <24d183ce-77b6-4fe1-a95e-0ff5ef72c7bd@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to shuffle/jumble letters of a given word? From: darkestkhan Injection-Date: Mon, 29 Jun 2015 13:42:26 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26537 Date: 2015-06-29T06:42:25-07:00 List-Id: On Sunday, June 28, 2015 at 2:06:29 PM UTC, Trish Cayetano wrote: > I am creating a "text twist game" where you guess the words in a jumbled manner. How do I set the code to shuffle the letters? > > Example: word to be guessed is HELLO > > What should be displayed is: LOLEH or LELHO > > Thanks in advance! Take the word to be guessed and permute it... there are some standard algorithms for permutations (like Knuth shuffle), check them up.