You have written an essay for school, and it has to be at least five pages long. But your essay is only 4.5 pages long! You decide to use your new Python skills to make your essay longer by spacing out the letters. Write a function that takes a string and a number of spaces to insert between each letter, then print out the resulting string.

```
def spaceitout(astring, number):
pile = ""
space = " "
for index in range(0,len(astring)-1):
pile = pile+ astring[index]+number*space
pile+=astring[len(astring)-1]

print pile
```

Note: The question specifically calls for spaces to be inserted between each letter.
Therefore, a solution such as:

```
def spaceitout(astring, number):
pile = ""
space = " "
for index in range(0,len(astring)):
pile = pile+ astring[index]+number*space
print pile
```
Would be close, but actually have extra spaces after the final character as well.

Computer Science & Information Technology

You might also like to view...

When specifying values for positioning, you may use either pixels or percentages

Indicate whether the statement is true or false

Computer Science & Information Technology

Planning for the implementation phase requires the creation of a detailed request for proposal, which is often assigned either to a project manager or the project champion. _________________________

Answer the following statement true (T) or false (F)

Computer Science & Information Technology