Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
17
Task/Babbage-problem/Python/babbage-problem-1.py
Normal file
17
Task/Babbage-problem/Python/babbage-problem-1.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Lines that start by # are a comments:
|
||||
# they will be ignored by the machine
|
||||
|
||||
n=0 # n is a variable and its value is 0
|
||||
|
||||
# we will increase its value by one until
|
||||
# its square ends in 269,696
|
||||
|
||||
while n**2 % 1000000 != 269696:
|
||||
|
||||
# n**2 -> n squared
|
||||
# % -> 'modulo' or remainder after division
|
||||
# != -> not equal to
|
||||
|
||||
n += 1 # += -> increase by a certain number
|
||||
|
||||
print(n) # prints n
|
||||
Loading…
Add table
Add a link
Reference in a new issue