Write a Python Program to Check a Decimal With a Precision of 2

Опубликовано: 27 Июнь 2023
на канале: Code With TJ
195
1

Hello Programmers, Welcome to my channel.

In this video you will learn about how to Write a Python Program to Check a Decimal With a Precision of 2

Python Scripts
======================
https://codewithtj.blogspot.com/2024/...

Python Functions Solved
==========================
https://codewithtj.blogspot.com/2023/...

Python Programs Solved
============================
https://codewithtj.blogspot.com/2023/...

Code
=============================
number = str(float(input("Enter a Decimal :")))

integer, fraction = number.split(".")

if len(fraction) == 2:
print("Decimal has Precision of 2")
else:
print("Decimal does not have Precision of 2")



Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners