PWC 254
PWC 254 I do the challenges this week in perl 4.019 on DOSBOX, and for comparison, also in python 1.4 beta on DOSBOX. My perl solutions also run on the current Perl 5.38, In the python case, my challenge 1 solution runs on Python 2.7.18, but my challenge 2 solution does not. Challenge 1 (Three Power) Links to code: Perl4.019 Python1.4b We are given an integer, and asked to verify if it represents the cube of another integer. The solution is to take the cube root and compare it to its integer portion. Here is the key perl 4 snippet: sub three_power { local( $n )=@_; $n=($n**(1/3)); $n==sprintf("%d",$n); } Here is the python 1.4 beta equivalent: def three_power(n): n=n**(1.0/3.0) return (n==int(n)) Challenge 2 (Reverse Vowels) Links to code: Perl4.019 Python1.4b We are given a string of alphabets. We are asked to identify which of the elements are vowels, and then to return a string in which the order of the vowel elements is reversed. For example, if 'a' is at