4th Street Bar Hive-Bar

Hive-Bar Powered by Hive beta-fdb5b5b

Community post

Minefield Game for Python

import random
w, h=10,10
Matrix=[[0 for x in range (w)] for y in range (h)]
for i in range (10):
i=random.randint(0,9)
j=random.randint(0,9)
Matrix[i][j]=1
deger=False
toplam=0
while deger==False:
satir=int(input("satır:"))
sutun=int(input("sutun:"))
if Matrix[satir][sutun]==0:
toplam=toplam+1
print (toplam)
else:
print ("BOOOM! You are Dead!")
deger=True
print (toplam)

3 upvotes $0.00

Replies (0)

Conversation

No replies yet

Replies will appear here as people join the conversation.

Review before signing

Posting as . Signing with . Keychain permission: Posting. Hive Keychain will ask you to approve this action next.


  
Technical details

Operation fingerprint: