Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Simple program that uses raw_input() to
- call functions after program has compiled
- and is running.
- Allows for testing scenarios and custom
- function calls with arguments.
- I call this "Function First Programming."
- Please give me feedback/opinions, thank you.
- Christian
- christianbear1221@gmail.com
- */
- function foo(){
- print("hello foo");
- }
- function bar(triangles){
- Var star = "*";
- for(i=0; i<=triangles; i++){
- Print(star);
- Star+="*";
- }
- }
- Var input = raw_input();
- If (input == "foo"){
- foo();
- }
- If (input == "bar"){
- input2 = raw_input("Argument?");
- bar(input2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement