Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set your subtitle preferences in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.
Show a Percentage (Solution)
00:00
When you divide 2
by 10
, you get a floating-point number with one decimal digit. You can format this as a percentage by using the percent sign as the format specification.
00:15 If you’ve been following along, then you can guess how to request zero decimal places. That’s right, you prepend a dot and a zero to the percent sign. You can use the same syntax in an f-string literal for a more compact syntax.
00:35 Okay, while this exercise wasn’t too difficult, it’s time to move on to another section of this course, in which you’ll interact with the user.
Become a Member to join the conversation.