from colorama import Fore, Back, Style
currentPrice = 14
previousPrice=20
if(currentPrice > previousPrice):
print(Back.GREEN + 'current Price greater ')
else:
if(currentPrice < previousPrice):
print(Fore.RED + 'previous price is greater')
else:
if(currentPrice == previousPrice):
print(Fore.BLUE + 'current price and previous price are equal')
print(Style.RESET_ALL)
print('back to normal now')
Output:
Comments
Leave a comment