0
What is the "%" sign for
Wanted a question where he was talked about. I believe it serves to indicate the rest of divisions that will not be exact, but I'm not sure. Thanks to everyone who answered my question, I'll follow the recommendations ;)
7 Réponses
+ 9
Sentinela
The % symbol in Python is called the Modulo Operator. It returns the remainder of dividing the left hand operand by right hand operand.
it is use for reminder
Example: 10%2 = 0, 10%3 = 1
10/2 = 5, 10/3 = 3.3
See this..
https://www.freecodecamp.org/news/the-python-modulo-operator-what-does-the-symbol-mean-in-python-solved/
And you should learn first..
https://www.sololearn.com/course/Python
+ 9
Sentinela It's a modulus operator you can get only remainder
example:-
5%2 = 1
because you get remainder 1
+ 5
Sentinela
You are correct with your assumption.
59%7 = 3 -> 8x7 +3
56%7 = 0 -> 8x7 +0
+ 3
The sign "%" is called modulo operator, in Python. You can find this in every programming languages, such as C#, Python, JavaScript, etc. Its main function is to calculate the remainder of two numbers in your program. You could start doing the "Python for beginners" course in Sololearn, or you could have a look at some articles of videos which explains you in further detail.
Python for beginners course on Sololearn:
https://www.sololearn.com/learn/courses/python-introduction
Modulo operator article:
https://realpython.com/python-modulo-operator/
Modulo operator video:
https://www.youtube.com/watch?v=qv-Qdi212X4
Please let me know if you need a further help on this.
+ 1
Hello Danish, i am grateful for the help, i would like to ask only for media which i can strengthen my understanding of python, i have already put in my list the three courses in this program.
Thanks again.
+ 1
Thanks Tuktuk for the answer, and thanks for showing this new course, I hadn't seen it yet