Answers for "python what does // do"

10

what is // in python

"""
  '//' is floor division on python which mean
  the result will be rounded down (eg: 3.14 become 3), so
  
  '5 // 2' will be 2
"""
Posted by: Guest on September-15-2021
2

what does % do in python

65 % 2
#This will be 1, since % will calculate the remainder of the variable
# % is the modulus operator
Posted by: Guest on April-23-2021

Python Answers by Framework

Browse Popular Code Answers by Language