SHARE
TWEET

Untitled

a guest Feb 4th, 2012 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. g := Module[{str, lis, numScores = 4},
  2.   str = InputString[];
  3.   lis = ToExpression[StringSplit[str, "+"]];
  4.  
  5.   If[Length[lis] != numScores,
  6.    
  7.    Beep[];
  8.    Print[lis];
  9.    Speak["Length is " <> ToString[Length[lis]]],
  10.    
  11.    Speak[Total[ToExpression[StringSplit[str, "+"]]]];
  12.    Print[Total[ToExpression[StringSplit[str, "+"]]]];
  13.    ]
  14.   ]
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top