+ 2
Chess Calculation ( Python recommend )
This Calculation is based on the first games of Chess that was played. Write a programme to calculate it in the following way. It is said that it is imposibble to calculate it. Chess board has 64 boxes. Start from the box 1. Where initial value is 1. ( x = 1 ) In box 2 it becomes double than previous. ( x = 2 ) In box 3 it becomes bouble tha previous. ( x = 4 ) Note: It always become double than previous box value. As 1, 2, 4, 8, 16, so on... Now Write a programme that calculate value of x in box 64. ( EASY TASK.) Write another programme that calculate sum of all values of x. ( FOR EXPERTS.) share your creatipns in answers...
5 Réponses
+ 1
Until you get to box 64, you 63-times multiply 1 by 2, therefore you get 2^63.
Every value in a box is a power of two. The sum of all powers of two until 2^63 is 2^64-1
To get the numbers in python:
2**63
2**64-1
+ 1
for their sum...
+ 1
sum of all
+ 1
any app to learn logic building ..???
0
The sum of all is 2^64-1
It is sum of powers of 2