Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 11
In some programming languages, such as in Python, dividing with single "/" always returns a floating point number. The quiz expected you to know that.
17th Apr 2019, 9:23 AM
Seb TheS
Seb TheS - avatar
+ 4
Darla Wilson the answer is pretty much language dependent. As Seb TheS implied it was most probably a Python quiz.
18th Apr 2019, 7:53 AM
Sonic
Sonic - avatar
+ 3
Please don't be too concrete about your questions. If you want a help from the community then you should provide the basic information so that we may help you. From whatever you have mentioned,it looks like you played a challenge in python language.I think so ....as you didn't provide the name of the language you played in which. In python to get an integer output(in your case it is "6"!!),you must use "//" floor division operator in python Programming language. Otherwise, python treats "/" operator as a "float" divisor opeartor and whatever you use as a data type integer or floats (must be numbers!!!) ,It will always give you a decimal number.
18th Apr 2019, 12:01 PM
Ayush Sinha
Ayush Sinha - avatar
+ 1
Depends on the language :)
18th Apr 2019, 1:05 PM
F. H.
F. H. - avatar
0
I once answered such a question with 6 as the answer and got it right.
18th Apr 2019, 11:53 AM
Seth
Seth - avatar
0
You have to read that properly again to get your doubts clear. When you use '/' which is a forwardslash. The output has to have decimal.
18th Apr 2019, 11:58 AM
Pooja Pooja
0
6.0 In python language
19th Apr 2019, 5:27 AM
raja sriram peri
raja sriram peri - avatar