Python #2 : Division
Well in this problem, we just have to divide two numbers and give output as integer and float. Well integer here means just the value before the decimal, you can think it as, if our answer is 34.44 then our integer answer is 34.
So what we will do is, just take two input from the user, i.e., a and b, then,
int_val = a // b
float_val = a / b
From here we can get integer value by '//' operator, which is special operator which divides any only returns positive integer value.
Also the '/' operator return division value, i.e., in decimal.
So, this is how you can solve the problem of division in HackerRank in Python Language.
Till next code, #Coders😎
Recent Posts
See AllMy last blogg about gaming from your android, or my other blogs, that I published earlier were not a big hit, not like this website or...
Comments