What means num ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What means num ?

24th Jan 2017, 5:33 PM
ggGamer 13
ggGamer 13 - avatar
5 Answers
+ 1
It's math, x = 3, num = 17 It's asking you to get the remainder with % ( % = Modulus Operator and remainder of after an integer division ) So it's 17 % 3, it does the math for you before printing it into the console.
24th Jan 2017, 6:28 PM
Alex
Alex - avatar
0
What's the context of this, num can be anything. Is it a variable? Sounds like it's something that has a num(ber) and is decalared as a variable ex; num = 1 num could also be some custom import, hard to tell.
24th Jan 2017, 5:43 PM
Alex
Alex - avatar
0
hmm....:ll x = 3 num = 17 print(num%x) how can i do this. ...I'm a bginner...😔
24th Jan 2017, 5:49 PM
ggGamer 13
ggGamer 13 - avatar
0
It's just 17(num) % 3(x) This code will print 2 into the console
24th Jan 2017, 6:00 PM
Alex
Alex - avatar
0
why? how can i know it?
24th Jan 2017, 6:13 PM
ggGamer 13
ggGamer 13 - avatar