#๐Ÿ”’ error

25 messages ยท Page 1 of 1 (latest)

fallen valveBOT
#

@glad nexus

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

#

Hey @glad nexus!

Please edit your message to use a code block

Add a py after the three backticks.

```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
merry haven
#

and whats the error

glad nexus
#

its giving wrong answer

#

0.0

#

i type correct formula

misty heath
#

What values did you type for x and y?

glad nexus
#

60 , 6

#

its should be 18.

#

its doing maths wrong

misty heath
#

you're using //

merry haven
misty heath
#

that's going to round down to an int

#

60 / 360 is 0.166

#

!e

print(60 / 360)
print(60 // 360)
fallen valveBOT
glad nexus
#

oh

#

its approxing it

misty heath
#

/ is regular division
// is floor division

glad nexus
#

thanks

#

problem solved

bitter raft
#

!e

import math

print(math.pi)
fallen valveBOT
fallen valveBOT
#
Python help channel closed for inactivity

This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.