|
|
|
|
|
|
|
|
* * * * * *
function1 function1 function1 function3 function1 function2 function1 function2 function1 function3 function1, function1 function2 function2, function1 function2 function1, function1 |
function1 function1 function1 |
|
|
If I wanted to simplify this code using for loops, how exactly would i use them inside of the function call? |
|
|
But also my assignment is to build those designs using only function calls. If I used used for loops, would that be breaking that parameter of the assignment? |
mrlowkey941 wrote: |
---|
and ask yourself what can I do to get what I just said. IN ONE STEP. instead of calling 3 functions how can I in that ONE function repeat * * * |
ianheinze wrote: |
---|
Write the following 3 functions. a) A function the prints three asterisks with three spaces in between each, starting in the first column: * * * Do not print a new-line in this function. b) A function that prints the same three asterisks with three spaces between each, but with two blanks (spaces) at the beginning of the line. c) A function that prints a new-line (and nothing else). Using only calls to these three functions in the main program, print the following 15-line design: |
|
|
ianheinze wrote: |
---|
If I wanted to simplify this code using for loops, how exactly would i use them inside of the function call? The same as always using a for loop? |
|
|
|
|