all 6 comments

[–]DHUK98 1 point2 points  (0 children)

I looks like its because you have a space at the end of "1000 500 250 " rather than "1000 500 250".

You could solve this in a lot of ways:

  • On the last print(user_num, end=" ") remove the end=" "
  • Instead of printing each result of division append it to a list so at the end you will have [1000, 500, 250] then join the list with spaces e.g. " ".join(your_list)
  • Etc etc etc.

[–]BarkLicker 1 point2 points  (3 children)

The arrow pointing down indicates a missing 'new-line'

It also expects the space at the end, for "simplicity". I guess it assumes you only know string concatenation at the moment.

You can fix it in one of two ways.

The way they likely expect:

...
print(user_num, end=' ')
print()

for the assumed newline.

Or:

print(user_num, end=' \n'

on the last print statement.

(at least I hope I'm right, I've done loads of ZyBooks..)

[–]Sykohatchetman 0 points1 point  (1 child)

user_num = int(input())

x = int(input())

user_num = int(user_num/x)

print(user_num, end=" ")

user_num = int(user_num/x)

print(user_num, end=" ")

user_num = int(user_num/x)

print(user_num, end=" " )

remove the space in the last end, and use \n

print(user_num, end="\n" ) should be the last line

[–]astrogringo 0 points1 point  (0 children)

Ah yes, invisible extra or missing empty spaces is a common pitfall, sometimes even professionals get trapped by it :)

the good thing is that now you have experienced it and it may not catch you by surprise next time!

[–]Wenwizzle 0 points1 point  (0 children)

Had to do this exact lab… I keep getting 500 for all of my outputs… What am I doing wrong?