- 1

Transportation project

Can anyone explain how to use the % operator in this project please?

14th Feb 2022, 1:28 PM
Nazeer Dann
Nazeer Dann - avatar
4 Réponses
+ 2
% is the modulo operator – it gives the remainder of a division, see lesson 8 of the sololearn course
14th Feb 2022, 1:37 PM
Lisa
Lisa - avatar
+ 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)
14th Feb 2022, 2:23 PM
NEZ
NEZ - avatar
0
Thank you ... I just didn't know how to use in this specific project but i figured it out 😅
14th Feb 2022, 1:47 PM
Nazeer Dann
Nazeer Dann - avatar
0
Thanks NEZ ...got it !
14th Feb 2022, 3:02 PM
Nazeer Dann
Nazeer Dann - avatar