Advertisement
Guest User

Untitled

a guest
Sep 30th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. /*
  2. Simple program that uses raw_input() to
  3. call functions after program has compiled
  4. and is running.
  5. Allows for testing scenarios and custom
  6. function calls with arguments.
  7. I call this "Function First Programming."
  8.  
  9. Please give me feedback/opinions, thank you.
  10. Christian
  11. christianbear1221@gmail.com
  12. */
  13.  
  14.  
  15. function foo(){
  16. print("hello foo");
  17. }
  18.  
  19. function bar(triangles){
  20. Var star = "*";
  21. for(i=0; i<=triangles; i++){
  22. Print(star);
  23. Star+="*";
  24. }
  25. }
  26.  
  27. Var input = raw_input();
  28.  
  29. If (input == "foo"){
  30. foo();
  31. }
  32. If (input == "bar"){
  33. input2 = raw_input("Argument?");
  34. bar(input2);
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement