Teach me python, I'll teach you chess

Sort:
mahimamantri

Hi.


Attend The Best Python Training In Pune From Sevenmentor. Practical Python Classes Sessions With Assured Placement Support From Experienced Faculty.

please_can_i_win_a_game

I can teach you Pythagorean Theorem, instead. Will that suffice?

DefenderPug2
Lurking_Garbage wrote:

I can teach you Pythagorean Theorem, instead. Will that suffice?

It’s just triangles…….

AnonymousNarwhal
llama47 wrote:

Once you learn one it's easier to learn others, because the process / thinking is basically the same.

One reason the answer helps is, like chess, there are all sorts of skill levels. Some people program casually while others have spent 5, 10, or 20 years in a professional setting. So just like with chess, knowing your level will let people know whether they can be useful to you.

 

True. That is, until you come across a different paradigm.

WALKINGLOSS
MontecristoA wrote:

Hello, any python programmers here who would like some chess lessons?

I would love to learn the language, currently enrolled in some courses, but I would like to make it more interactive.

When I was starting out in chess, there were courses as well, but having a coach really made the process easier and more enjoyable. I am hoping the same is true for python.

In exchange for your programming tutoring, I would be able to help you with your chess. I am a candidate master with teaching experience (25+ students overall), will be able to address issues you face in the game and help you improve.

 

I can't teach you Python: I'm actually learning Java right now lol. However, you can use Codecademy (which is free and accessible) to learn. It's apparently pretty popular for being great at teaching coding (or programming; I don't know the difference haha).

GeorgeWyhv14

Pythagorean theorem in computer science

Initialize 2 variable called a and b

c is deduced by placing this formula

c=(a^2+b^2)^(1/2)

please_can_i_win_a_game
DefenderPug2 wrote:
Lurking_Garbage wrote:

I can teach you Pythagorean Theorem, instead. Will that suffice?

It’s just triangles…….

I tried to joke. 

Thee_Ghostess_Lola

i coded a blockchain miner in python if a/o wansta see it. it'll find abuncha leading zeros in sha256. tho after like 12-zeros ?..."were gonna need a bigger computer"(gulp)   lol !

premvinodhpc

I can teach you python and learn chess from you happy.png A win, win situation for both of us.

I also know C, C++, Java, HTML, CSS, Javascript, React, JQuery and a little bit of Angular.

So make your pick and I will teach you.

Basing on how much you know I can teach you data structures which is the base to learn any programming language along with python.  So it becomes easy to learn any programming language. 

Please reach out to me on my account

Kind Regards

Thee_Ghostess_Lola

here's that mockminer funzie i wrote in python & spoke a in #52. i set the argument in the prezeros parameter to 8 (leading zeros) and gave it a 1BB loops try. im using the loop counter i as the blockchain itself in lieu a the real life bitcoin blocknumber, transactions, & previous hash cluster. this way it gens hashes way faster (that happily awaits us in the sha256 algo thats embedded in the hashlib library happy.png )

****

import time
import hashlib

prezeros = 8

def fetch():
    for i in range (1000000000):
        hex_string = str(i)
        lotto = hashlib.sha256(hex_string.encode()).hexdigest()
        if lotto.startswith('0'*prezeros):
            print(f'Found Oneshot Count: {i} tries...yippee !!')
            grandhash = str(i)
            print (hashlib.sha256(grandhash.encode()).hexdigest())

            return lotto

begin = time.time()

fetch()

spread = time.time() - begin

print (str(spread)[:10] + f' seconds')

****

save it dn in a dot py file & run it & see what happens !...& remember to load the hashlib library (as i assume uv got the time module already crackling happy.png )

Thee_Ghostess_Lola

(shhhh...dont tell a/o...it'll find it on the 426,479,724th try...)

Thee_Ghostess_Lola

ok. just ran it & got this :

Found Oneshot Count: 426479724 tries...yippee !!
00000000690ed426ccf17803ebe2bd0884bcd58a1bb5e7477ead3645f356e7a9
572.839307 seconds

so. the sha256 hash abv represents the base10 integer 426,479,724...a 64-character hexstring w/ (8) leading zeros - found in 573 seconds or abt 9+ mins.

check it here :

https://emn178.github.io/online-tools/sha256.html

the odds of hitting this is 16^8 ≈ 4.3BB to 1. so sooper dooper early...yee !

Abhinav
Thee_Ghostess_Lola wrote:

--- SNIPPED THE CODE ---

save it dn in a dot py file & run it & see what happens !...& remember to load the hashlib library (as i assume uv got the time module already crackling )

I think, the hashlib library is pre-included in latest versions of Python now. 

And someone will probably toast their cpu if they run that code for 8 pre zeroes. Better to try it with something like 4 or 5. happy.png

Thee_Ghostess_Lola

yeah maybe. if u smell burning plastic then abort lol !

im running V3.6...should that make me feel like a brown banana ?

Thee_Ghostess_Lola

gottit...if u plug in 2867882182685 into a sha256 converter u'll get 10 leading zeros.

so...yee !!

(it only took me like 3 wks to go thru 2.8 trillion loops...feeling pathetically happy lol !)