From 1f252887e05db38fe54a66d150ba5cccc978fb50 Mon Sep 17 00:00:00 2001 From: Asmita-Dutta Date: Tue, 18 Oct 2022 22:57:50 +0530 Subject: [PATCH 1/3] Dice Roll --- scripts/Dice Roll/main.py | 10 ++++++++++ scripts/Dice Roll/readme.md | 5 +++++ 2 files changed, 15 insertions(+) create mode 100644 scripts/Dice Roll/main.py create mode 100644 scripts/Dice Roll/readme.md diff --git a/scripts/Dice Roll/main.py b/scripts/Dice Roll/main.py new file mode 100644 index 0000000..99e3369 --- /dev/null +++ b/scripts/Dice Roll/main.py @@ -0,0 +1,10 @@ +import random +b=input("Do you want to roll the dice?y/n: ") +if b=='y': + a=int(input("Number of times you want to roll: ")) + print("Result: ") + for i in range(0,a): + ans=random.randint(1,6) + print(i+1,".",ans) +else: + print("Good Bye!") \ No newline at end of file diff --git a/scripts/Dice Roll/readme.md b/scripts/Dice Roll/readme.md new file mode 100644 index 0000000..eb0ebb6 --- /dev/null +++ b/scripts/Dice Roll/readme.md @@ -0,0 +1,5 @@ +Dice Roll Game with PYTHON + +#Steps : +Run - python main.py +Have a fun time!! From 2267dcfdaa11494fbea2d1ef0c6126376fa04ef7 Mon Sep 17 00:00:00 2001 From: Asmita-Dutta Date: Wed, 19 Oct 2022 01:17:50 +0530 Subject: [PATCH 2/3] Tic Tac Toe --- scripts/Tic-Tac-Toe/main.py | 40 +++++++++++++++++++++++++++++++++++ scripts/Tic-Tac-Toe/readme.md | 5 +++++ 2 files changed, 45 insertions(+) create mode 100644 scripts/Tic-Tac-Toe/main.py create mode 100644 scripts/Tic-Tac-Toe/readme.md diff --git a/scripts/Tic-Tac-Toe/main.py b/scripts/Tic-Tac-Toe/main.py new file mode 100644 index 0000000..91e79a9 --- /dev/null +++ b/scripts/Tic-Tac-Toe/main.py @@ -0,0 +1,40 @@ +def check(m): + if ( (m[0][0] == m[0][1] == m[0][2] != 0) + or (m[1][0] == m[2][0] == m[0][0] != 0 ) + or (m[0][0] == m[1][1] == m[2][2] != 0) + or (m[1][0] == m[1][2] == m[1][2] != 0) + or (m[2][0] == m[2][1] == m[2][2] != 0) + or (m[0][1] == m[1][1] == m[2][1] != 0) + or (m[0][2] == m[1][2] == m[2][2] != 0) + or (m[0][2] == m[1][1] == m[2][0] != 0) ): + return 1 + else: + return 0 + + +def display(m): + for i in range(3): + for j in range(3): + print(m[i][j],end = "\t") + print("\n") + + +a=input("Want to play tic-tac-toe?y/n: ") +if a== "y": + m = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] + while True: + i,j= int(input("X: enter row no.")), int(input("enter column no.")) + m[i][j]="X" + display(m) + if check(m)== 1: + print("Congratulations you won!") + break + + i,j= int(input("O: enter row no.")), int(input("enter column no.")) + m[i][j]="O" + display(m) + if check(m)== 1: + print("Congratulations you won!") + break +else: + print("Good Bye!") \ No newline at end of file diff --git a/scripts/Tic-Tac-Toe/readme.md b/scripts/Tic-Tac-Toe/readme.md new file mode 100644 index 0000000..456a99c --- /dev/null +++ b/scripts/Tic-Tac-Toe/readme.md @@ -0,0 +1,5 @@ +Tic Tac Toe with PYTHON + +#Steps : +Run - python main.py +Have a fun time!! From 3108d05d03f03707c21d3ea03a8be1a598d6c88a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 22 Oct 2022 21:01:59 +0000 Subject: [PATCH 3/3] docs(contributor): contrib-readme-action has updated readme --- README.md | 90 ++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 56 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 628fb28..4a8c52f 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,13 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 Noor Ahmed + + + Khushi260 +
+ Khushi Jha +
+ muratonuryildirim @@ -122,21 +129,14 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Vallabh Chugh
- + + Abbhiishek
Abhishek Kushwaha
- - - - - Khushi260 -
- Khushi Jha -
@@ -339,13 +339,20 @@ Thanks a lot for spending your time helping! Keep rocking 🍻 - - tolgakurtuluss + + smeax
Null
+ + + tolgakurtuluss +
+ Null +
+ srinjoy-26 @@ -380,6 +387,14 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Aditya Tiwari
+ + + + + Asmita-Dutta +
+ Null +
@@ -387,8 +402,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Vedant Jolly
- - + Hemant2801 @@ -416,7 +430,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Parinthapat P.
- + + iamrahul8 @@ -430,8 +445,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Riya Roy
- - + royninja @@ -459,7 +473,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Yash Indane
- + + ambushneupane @@ -473,8 +488,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Aswin Shailajan
- - + jrafaaael @@ -502,7 +516,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Aiman Aisha
- + + akashJainAJ11 @@ -516,8 +531,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Arijit Ghosh
- - + Yaswanth820 @@ -545,7 +559,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Heshanthaka
- + + Gokul-Ks @@ -559,8 +574,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
KUMAR SANTOSH
- - + Manice18 @@ -588,7 +602,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Raj Saha
- + + ramonsaraiva @@ -602,8 +617,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Riya Jaiswal
- - + sarthakroy2002 @@ -631,7 +645,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Anjali Chauhan
- + + anshrusia200 @@ -645,8 +660,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Arpit Bhardwaj
- - + artemis-i-guess @@ -674,6 +688,14 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Yash Nilesh Brid
+ + + + + mclmza +
+ Michele Mazza +
@@ -688,8 +710,7 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Mubeen Ahmad
- - + neocollege @@ -710,7 +731,8 @@ Thanks a lot for spending your time helping! Keep rocking 🍻
Sameer Sahu
- + + shatanikmahanty