Apr-10-2022, 07:08 PM
close to that. while str() isn't exactly necessary, that was what i had in mind ... that foo() did the formatting.
def foo (floating_point_number) : integer = int (floating_point_number) if integer == floating_point_number : return str(integer) return str(floating_point_number) print (f'{foo (3.25)}, {foo (4.0)}')
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.