Advertisement
Guest User

Untitled

a guest
Feb 4th, 2012
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  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. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement