0

When I say there are 12 apples, there's a space before the period. Does anyone know how to make a space not be there?

def main():
  apples = int(input("Enter the number of apples: "))
  time = float(input("Enter how much time in hours there is to find apples: "))
  print("There are", apples, "apples,", ENOUGH(apples), OBJECTIVE(time))
def ENOUGH(apples):
  if apples == 12:
    return("which is enough")
  elif apples < 12:
    return("which is not enough")
  elif apples > 12:
    return("which is too many")
def OBJECTIVE(time):
  if time >= 2:
    return TIME(time)
  elif time < 2:
    return(".")
def TIME(apples):
  if apples < 12:
    return(', but we have time to get more.')
  elif apples > 12:
    return(', but we have time to put some back.')
  elif apples == 12:
    return(".")
main()
SkylerS
  • 1
  • 2

1 Answers1

0

Use string concatenation, like

print("There are", apples, "apples,", ENOUGH(apples)+OBJECTIVE(time))

This stops the separator(whitespace) to come between the last two arguments.

Eshonai
  • 121
  • 5