- 1
Transportation project
Can anyone explain how to use the % operator in this project please?
4 Antworten
+ 2
% is the modulo operator – it gives the remainder of a division, see lesson 8 of the sololearn course
+ 1
An example,
suppose you have 6 toys and there are 4 children, you can give 1 toy to each child, then calculate the remaining toys.
So you will require here %:
print(6%4)
0
Thank you ... I just didn't know how to use in this specific project but i figured it out 😅
0
Thanks NEZ ...got it !