Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
234 B
2
Indexable
Never
def StarRating(str):
    i = round(float(str) * 2) / 2
    if i % 1 == 0:
        print ("full "* int(i) + "empty "* (5 - int(i)))
    else :
        b = i - 0.5
        print("full " * int(i)+"half "+ "empty " * (5 - int(i)))