Python Online Compiler & Playground
HTML/CSS/JavaScript
HTML
CSS
Javascript
C++
C
PHP
Java
Python
Swift
C#
Ruby
Node.JS
Kotlin
jQuery
Go
R
TypeScript
Start Python Course
Register
Testing Numbers and their Squares
+4
Author: Jibril Balogun
Dark
Public
Save
PY
py
1
2
3
4
5
6
7
#Got the Idea from Calvin Capstone
numbers =
(
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
)
squares =
(
1
,
4
,
9
,
16
,
25
,
36
,
49
,
64
,
81
,
100
,
121
,
144
,
169
)
print
(
all
(
numbers
[
i
]
**
2
== squares
[
i
]
for
i
in
range
(
len
(
numbers
))))
Enter to Rename, Shift+Enter to Preview
OUTPUT