27
loading...
This website collects cookies to deliver better user experience
@a
and @b
.a
and b
are an array of integers. It also isn't stated what the expected output is, so I've based it on the string in the example.first_nums
and second_nums
. I then check they are the same size.dots
that has the string (a × b)
and another array called sums
that has the result of a × b. Finally I use a print statement to display the result.$ ./ch-1.py "(1, 2, 3)" "(4, 5, 6)"
(1 × 4) + (2 × 5) + (3 × 6) => 4 + 10 + 18 => 32
$ ./ch-1.pl "(1, 2, 3)" "(4, 5, 6)"
(1 × 4) + (2 × 5) + (3 × 6) => 4 + 10 + 18 => 32
$s
.strings
list.$ ./ch-2.py redivider
r redivider e edivide d divid i ivi v
$ ./ch-2.py deific
d e i ifi f c
$ ./ch-2.py rotors
r rotor o oto t s
$ ./ch-2.py challenge
c h a l ll e n g
$ ./ch-2.py christmas
c h r i s t m a