Playback Speed
Some people have a habit of lecturing speaking rather quickly, and it’d be nice to slow them down, a la YouTube’s 0.75 playback speed, or even by having them pause between words.
In a file called playback.py
, implement a program in Python that prompts the user for input and then outputs that same input, replacing each space with ...
(i.e., three periods).
Hints
Tip
- Recall that input returns a str, per input.
- Recall that a
str
comes with quite a few methods, per string-methods.
Before You Begin
- Ensure you are in the root directory of the repository that you cloned to your machine.
- Change directory to
src/function_variables/
in your terminal window. - create or open the file
playback.py
This is where you’ll write your program.
How to Test
Here’s how to test your code manually:
-
Run your program with
python playback.py
. TypeThis is Killarney Heights!
and press Enter. Your program should output: -
Run your program with
python playback.py
. TypeThis is our week on functions
and press Enter. Your program should output: - Run your program with
python playback.py
. TypeLet's implement a function called hello
and press Enter. Your program should output
You can execute the below to check your code using pytest
from the root directory.
A green output from running the test means it was successful. A red output means there is a bug in your code that you need to fix.
How to Submit
From github desktop or the command line, commit your changes and push them to your repository.
Codespaces
If you are using codespaces, you can commit your changes directly from the Codespace interface. Click on the Source Control icon in the left sidebar, then click on the "..." button and select "Commit to main". Enter a commit message and click "Commit".
Codespace terminal or your local terminal.
Note
You will need to have installed git-scm
for this to work locally
At the /functions_variables $
prompt in your terminal:
Note
Remember to replace "your message here" with a meaningful commit message that describes your changes.