Detect if the input contains only letters

output 1 if input is only letters.
output 0 if input contains anything that is not a letter.

IN

r7oXpZe9NBPS7Rbj

OUT

0

IN

VJT63NuYxZjIWREu

OUT

0

IN

OhesLuQPHDyztooU

OUT

1

IN

rYUFsCTWJmrmzcNc

OUT

1

IN

AmMtgzklrKQhRZJD

OUT

1

IN

aPorUe3QKaVMJ4v2

OUT

0

IN

rQRHpyydN3MiEoPY

OUT

0

IN

fXUzUsRhqFzZgCGE

OUT

1

IN

fXUzUsRhqFzZgCGE

OUT

1

IN

PbbxRVunfktFvCTa

OUT

1

IN

lRFJEAd4EEv6Gm1k

OUT

0

IN

ltLWCKe5ErPAMX17

OUT

0
Login to submit solution


44 symbols python3 failed test 3 Wrong answer
0
instead of
1
Sun Feb 18 14:04:49 2018 PFischbeck
print(int(all(c.islower()for c in input())))
78 symbols python3 failed test 1 Code error

Traceback (most recent call last): File "./code", line 2, in <module> for x in input: TypeError: 'builtin_function_or_method' object is not iterable

Mon Feb 26 12:30:28 2018 lukenick
flag=True
for x in input:
 if not x.isalpha():
  flag=False
if flag:
 print(1)
27 symbols python3 failed test 1 Code error

Traceback (most recent call last): File "./code", line 1, in <module> print(int(input().isalpha)) TypeError: int() argument must be a string, a bytes-like object or a number, not 'builtin_function_or_method'

Mon Feb 26 14:41:33 2018 fbroeren
print(int(input().isalpha))
21 symbols ruby2.0 failed test 1 Wrong answer

                      
instead of
0
Mon Feb 26 21:48:48 2018 CodingAnarchy
gets[/\d/].nil? ? 1:0
7 symbols pyth failed test 1 Wrong answer
False
instead of
0
Sun Mar 18 03:49:19 2018 Krimpoche
<.{w.{G
9 symbols pyth failed test 3 Wrong answer
0
instead of
1
Sun Mar 18 03:52:23 2018 Krimpoche
*<.{w.{G1
7 symbols pyth failed test 1 Code error

Traceback (most recent call last): File "/usr/bin/pyth.py", line 713, in <module> exec(py_code_line, environment) File "<string>", line 1, in <module> TypeError: assign() missing 1 required positional argument: 'b'

Mon Mar 26 23:27:33 2018 GolfingSuccess
qA{r0+A
8 symbols pyth failed test 1 Code error

Traceback (most recent call last): File "/usr/bin/pyth.py", line 713, in <module> exec(py_code_line, environment) File "<string>", line 2, in <module> File "/usr/bin/macros.py", line 377, in uniquify raise BadTypeCombinationError('{', a) macros.BadTypeCombinationError: Error occured in function: { Arg 1: None, type NoneType.

Mon Mar 26 23:32:38 2018 GolfingSuccess
qG{r0+Gz
7 symbols pyth failed test 3 Wrong answer
0
instead of
1
Mon Mar 26 23:35:33 2018 GolfingSuccess
s<{rwZG
8 symbols pyth failed test 1 Wrong answer
1
instead of
0
Mon Mar 26 23:37:04 2018 GolfingSuccess
s<S{rz0G
33 symbols perl failed test 1 Code error

Undefined subroutine &main::input called at ./code line 3.

Mon Mar 11 21:04:27 2019 this-is-weird

print(int(input().isalpha()))

View all solutions