#๐ how to add a period after the second number in python
18 messages ยท Page 1 of 1 (latest)
@unreal mist
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.
divide by 10?
!e
num = 255
print(num / 10)
@marsh pulsar :white_check_mark: Your 3.12 eval job has completed with return code 0.
25.5
Turn it into a string, and use insert() at the index 2
that's not reliable for numbers of any len
He wants it aftet the second digit?
also strings don't have insert()
Oh does it not? I see
even though the only examples they gave are 3 digit numbers, ideally it would work for numbers of any size
no that works great i didnt even think of dividing it
4555, according to you would be 455.5, ehich is not after the second digit tho
Np! If that's all, you can close this thread with !close
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.