New course! Every coder should learn Generative AI!
Try a free lesson6 Answers
+ 3
To check how many times a number fits into another number:
11//4
#4+4=8
If we add 4 again, we get a number greater than 11. So 4 goes into 11 twice.
+ 7
Dibakar Acharjee ,
since you have started with sololearn just a few days ago, it is recommended to start learning from the *python for beginner* tutorial.
https://www.sololearn.com/Course/Python-for-Beginners/?ref=app
additional: here is a link to a short tutorial about the use of "//" (floor division) and "%" (modulo division):
https://www.sololearn.com/learn/Python/4430/?ref=app
+ 2
# Hi, Dibakar Acharjee !
# Here's an example:'
t = 128 # Minutes.
print(f"{t} minutes = {t//60} hours and {t%60} minutes.")
+ 1
Thanks, everyone. My confusion is now clear.
0
What about %
0
Ouch. Sorry.
Showing the same example:
Four fits into 11 twice, forming the closest possible number - 8. Calculating 11-8 we get three. Three will be the remainder of the division. that is, the % sign finds the remainder of the division