DEV Community

Cover image for Slowing Things Down: What CS50P’s "Playback Speed" Teaches Us About Clear Tech Communication
Dilesh Zingare
Dilesh Zingare

Posted on

Slowing Things Down: What CS50P’s "Playback Speed" Teaches Us About Clear Tech Communication

Welcome back to my new series of "Cracking CS50P: A DevAdvocate's Python Guide", today we are going to dive into how I tackled the second problem in Problem Set 0: "Playback Speed" (playback.py).

If you haven't read the 1st article in this series then, My Bro you are missing the important detail because it's the first article in this series so trust me you don't want to miss it.

**_

Recap of 1st Article indoor.py.........

_**In the 1st article we saw how to convert any alphabet case to Upper Case, Lower Case and Title Form and how to remove the any whitespace from the users input.

.lower(): This converts all uppercase alphabets into lowercase.

.strip(): As a bonus tip, you can chain this method to remove any accidental leading or trailing whitespace from the user's input.

.upper(): This converts all lowercase alphabets into uppercase.

.title(): This capitalizes the first letter of every word. (e.g., "this is cs50" becomes "This Is Cs50").

Let me tell you a secret, As the first mistake I misunderstood this one too and print out the exact statement like This...is...CS50. and This...is...our...week...on...functions. this is so embarrassing I could......
**_

Let's Start 2nd Article playback.py..........
_**
In this part we will see that how to slow down in text. So, for slowing down in the pace of text we use .replace() syntax. What's it does nothing much it only do as replace something into the instructed one. So, in this problem we have to replace the space character " " in the sentence into triple dots "...". Why only this? Because it's instructed in the instruction section of the problem set 0.

If you want to check how it's exactly done then watch in my YouTube Channel.
If you have any doubts about this article feel free to drop a comment and I have uploaded the YouTube lecture video so watch it. See you in the next article.

Top comments (0)