x=50 print(("Hi, your percentage is"if x>100else"Your percentage is")+" %.f%%"%x)
This prints out “Your percentage is 50%”
Which is what I want, but is there a better and more simpler way to do this that takes a lesser amount of codes/lines? Can “x” somehow be combined into the print statement? Assume x can change values, I just inserted 50 for demonstration.