Sort by

recency

|

999 Discussions

|

  • + 0 comments

    Quick tip: Use / for float division (5 / 2 = 2.5) and // for integer division (5 // 2 = 2).

  • + 0 comments

    If you're working with division in Python, make sure to use / for float division and // for integer division. For example, 5 / 2 returns 2.5 while 5 // 2 returns 2. You can find more practical examples and guides like this on websites such as VisaCheckQatar.

  • + 1 comment

    I can solve both 0 and 1 Test case separately. When i write both cases in one place then both cases are wrong, help me out guys, please!

    • + 0 comments

      It seems like the issue is handling test cases 0 and 1 together. Try separating the logic for each test case like this:

      For test case 0, handle it with an if condition to avoid errors (like division by zero). For test case 1, manage it separately with an elif. That way, you prevent both test cases from interfering with each other.

      Hope that clears it up! Let me know if you need more help.

  • + 0 comments

    a=int(input()) b=int(input()) print(a//b,"\n",a/b)

  • + 0 comments

    If you're working with division in Python, make sure to use / for float division and // for integer division. For example, 5 / 2 returns 2.5 while 5 // 2 returns 2.

    If you're exploring more coding tips, check out this helpful resource on Menu — it covers a variety of tech and programming topics!