Search the Community
Showing results for tags 'translation'.
-
I was tasked out with converting perl subroutines to php, I'm not even a novice I have no clue how to even code this properly. I was given a four hour deadline please help. print "Enter any amount of test scores to find the average, median and standard deviation\nEnter your numbers below, Press Enter after each set, your last set of digits\nPress CTRL-D to receive your information or CTRL-C to cancel.\n"; @gnom = <STDIN>; sub avg { $tot = 0; foreach $num (@gnom) { $tot += $num; $mean = $tot/(scalar @gnom); } print "This the average of your grade are: $mean\n"; } avg; sub med { @gnom = sort(@gnom); if(@gnom % 2 == 0 or 1){ $sum = @gnom[(@gnom/2)-1] + @gnom[(@gnom/2)]; $med = $sum/2; print "The median grade is: $med\n"; } } med; sub stdv { $tot = 0; $tot1 = $tot; foreach $num (@gnom) { $tot += $num; $m = $tot/(scalar @gnom); $tot1 +=($mean-$num)**2; } $n2 = $tot1 / (scalar @gnom); $stderd = sqrt($n2); print "The standard deviation of your grade is: $stderd\n" } stdv;
-
Hi All, I am just wondering if anyone has a recommendation for me. I am in the process of working on a book with a friend and we are creating our own language within it (not programming, think elves and whatnot) and I am looking for a script that will allow me to quickly translate our dictionary of words in this new language. I need to be able to add words as they are created. Ideally, I would like them to have an audio file attached to the definition as well. So I guess it needs to be an online translator as well as a dictionary. Anyone know of such a thing? Thanks.