diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-01-18 00:31:44 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2021-01-18 00:31:44 +0000 |
| commit | 09588fa9c967a457c16e5d5aa802bc2db21cd028 (patch) | |
| tree | 1d9a1993b7a4e7ff7b7a0bb9e315c1e326a44869 /challenge-083 | |
| parent | cf03022d414591f0ca29b7bd8530fe50d543a3ce (diff) | |
| download | perlweeklychallenge-club-09588fa9c967a457c16e5d5aa802bc2db21cd028.tar.gz perlweeklychallenge-club-09588fa9c967a457c16e5d5aa802bc2db21cd028.tar.bz2 perlweeklychallenge-club-09588fa9c967a457c16e5d5aa802bc2db21cd028.zip | |
- Added Python and Scala solutions to weeks 83, 84, 85, 86 and 87 by Laurent Rosenfeld.
Diffstat (limited to 'challenge-083')
| -rw-r--r-- | challenge-083/laurent-rosenfeld/python/ch-1.py | 5 | ||||
| -rw-r--r-- | challenge-083/laurent-rosenfeld/scala/ch-1.scala | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/challenge-083/laurent-rosenfeld/python/ch-1.py b/challenge-083/laurent-rosenfeld/python/ch-1.py new file mode 100644 index 0000000000..ad606a0a21 --- /dev/null +++ b/challenge-083/laurent-rosenfeld/python/ch-1.py @@ -0,0 +1,5 @@ + + +input = "The purpose of our lives is to be happy" +words = input.split() +print(len("".join(words[1:len(words)-1]))) diff --git a/challenge-083/laurent-rosenfeld/scala/ch-1.scala b/challenge-083/laurent-rosenfeld/scala/ch-1.scala new file mode 100644 index 0000000000..5d3d06fc57 --- /dev/null +++ b/challenge-083/laurent-rosenfeld/scala/ch-1.scala @@ -0,0 +1,7 @@ + +object wordLength extends App { + val instr = "The purpose of our lives is to be happy" + val words = instr.split(" ") + println(words.slice(1, words.length - 1).mkString.length) +} +// 23
\ No newline at end of file |
