Saturday, October 7, 2023
how to limit number of decimal places in python | how to truncate decimal in python
In this video shorts, you will learn how to limit number of decimal places in python and will learn to write a python program how to truncate decimal in python. It is just a 1 minute #shorts of #python3 where you will learn the use of format specifier %f. When %.2f is used in print statement, you get the output limited to 2 decimal places. When %f is replaced by %d format specifier, the float value is truncated and you get only integer output.
This video tutorial is in the form of #ytshorts created by #bintuharwani as a part of #pythonprogramming tutorial series for #pythonforbeginners and a complete playlist is provided of #pythontutorial in this #pythonfreecourse
Link of the Shorts:
https://www.youtube.com/shorts/Gfeno5RFGOc
Detailed Video:
#2 Python Tutorial for Beginners | Taking User input in Python
https://www.youtube.com/watch?v=KZPjRLIMoQs
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment