from colorama import init, Fore, Style
import os
if Name == "Germany" or Name == "Italy" or Name == "Poland":
Height = int(input("How high should the image be? Maximum is 4608 pixels."))
if Height < 1:
print(Fore.RED + "This is not a valid height!")
exit()
elif height > 0:
Width = int(Height * (16 / 9))
The following problem:
So far the program can already determine if the input is below 1, which would be an invalid height for an image. But how do I do that if I want to prevent that when a letter or something else is entered that such an ugly error message appears and the program instead
print(Fore.RED + "This is not a valid height!")
exit()
executes
If some more code is needed to understand the context, please let me know