- 2
Python function that returns a Boolean result based on whether the string parameter passed in is an integer.
Ex 123=True but 123.0= false
11 RĂ©ponses
+ 5
Sandesh Patil ,
please do not start a new discussion inside the feed of an other person.
> it would be better if you start your own question, because the current discussion started long time ago. hence people may not be aware of your question..
> to give helpful support we need to see your attempt first. without having seen your code we do not know what your issue is.
0
Invalid syntax
0
Ok
0
Andrew Choi ,
please try to avoid giving solutions or code to the asker, if he has not presented his attempt.
thanks for your understanding!
0
Lothar i actually am not understanding and feel extremely disrespected that you would attempt to tell me what i can or cannot post. i have seen your posts and find them very helpful and i have respect for what i have seen from you.
i will continue to post what i feel like posting and contribute in my own way to assist and learn from others in the programming environment.
thanks for your understanding!
0
Anybody knows online part time job sites
0
Write a Python function that returns a boolean result based on whether the string parameter passed in is an integer
- 1
Make use of str::isdigit() method đ
- 1
Yes
- 1
if you copied and pasted my code, you will need to replace te quotes. a weird thing in sololearn is that quotes from discussions are not quotes in code. i dont know why that is. below is the same code, but in playground.
https://code.sololearn.com/cAINP0Ebnf1u/?ref=app
- 2
is this what you are looking for?
def my_func(a):
return a==â123â
if __name__ == â__main__â:
x=my_func(â123.0â)
print(x)
# alternatively you could just put the function within the print statement.