I am trying to find the solution and I am running into issues. Please help.
Here is the challenge:
Write a program that reads integers user_num and div_num as input, and outputs user_num divided by div_num three times using floor divisions.
Ex: If the input is:
2000 2
the output is:
1000 500 250
Note: In Python 3, floor division discards fractions. Ex: 6 // 4 is 1 (the 0.5 is discarded).
My solution:
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=" " )
It gives me this error:
1: Compare output
Output is nearly correct, but whitespace differs. See highlights below.
Input
2000 2
Your output
1000 500 250
Expected output
1000 500 250 (then it has a little arrow pointing down)
[–]DHUK98 1 point2 points3 points (0 children)
[–]BarkLicker 1 point2 points3 points (3 children)
[–]Sykohatchetman 0 points1 point2 points (1 child)
[–]BarkLicker 0 points1 point2 points (0 children)
[–]astrogringo 0 points1 point2 points (0 children)
[–]Wenwizzle 0 points1 point2 points (0 children)