Ramikan-BR
commited on
Commit
•
79479c3
1
Parent(s):
cfac1a1
Update README.md
Browse files
README.md
CHANGED
@@ -12,6 +12,79 @@ tags:
|
|
12 |
- sft
|
13 |
---
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
# Uploaded model
|
16 |
|
17 |
- **Developed by:** Ramikan-BR
|
|
|
12 |
- sft
|
13 |
---
|
14 |
|
15 |
+
1 - ['Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Input:\nContinue the fibonnaci sequence.\n\n### Output:\n1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811']
|
16 |
+
|
17 |
+
2 - Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
18 |
+
|
19 |
+
### Input:
|
20 |
+
What is fibonacci sequence?
|
21 |
+
|
22 |
+
### Output:
|
23 |
+
The Fibonacci sequence is a series of numbers in which each number is the sum of the two preceding ones, usually starting with 0 and 1. The sequence goes like this: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46374, 75031, 121305, 196600, 317905, 514511, 832416, 1347927, 2180343, 3528260, 5705503, 9233763, 14949263,
|
24 |
+
|
25 |
+
3 - Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
|
26 |
+
|
27 |
+
### Input:
|
28 |
+
crie o jogo da cobrinha completo.
|
29 |
+
|
30 |
+
### Output:
|
31 |
+
``` python
|
32 |
+
import random
|
33 |
+
|
34 |
+
class Game:
|
35 |
+
def __init__(self):
|
36 |
+
self.board = []
|
37 |
+
self.player = 'X'
|
38 |
+
self.player_score = 0
|
39 |
+
self.computer_score = 0
|
40 |
+
|
41 |
+
def play(self):
|
42 |
+
while True:
|
43 |
+
self.board = [['.' for _ in range(3)] for _ in range(3)]
|
44 |
+
self.player = 'X'
|
45 |
+
self.computer_score = 0
|
46 |
+
self.player_score = 0
|
47 |
+
|
48 |
+
for _ in range(3):
|
49 |
+
for _ in range(3):
|
50 |
+
self.board[_][_] = '.'
|
51 |
+
|
52 |
+
print(self.board)
|
53 |
+
|
54 |
+
while True:
|
55 |
+
user_input = input('Player {}, pick a cell: '.format(self.player))
|
56 |
+
if user_input in self.board:
|
57 |
+
self.board[user_input] = self.player
|
58 |
+
self.player = 'O' if self.player == 'X' else 'X'
|
59 |
+
self.player_score += 1
|
60 |
+
if self.player_score == 9:
|
61 |
+
print('Player {} wins!'.format(self.player))
|
62 |
+
return
|
63 |
+
else:
|
64 |
+
print('Invalid input. Try again.')
|
65 |
+
|
66 |
+
while True:
|
67 |
+
computer_input = random.choice(self.board)
|
68 |
+
if computer_input == '.':
|
69 |
+
print('Computer picks {}.'.format(computer_input))
|
70 |
+
break
|
71 |
+
self.board[computer_input] = self.computer_score
|
72 |
+
self.computer_score += 1
|
73 |
+
if self.computer_score == 9:
|
74 |
+
print('Computer wins!'.format(self.computer_score))
|
75 |
+
return
|
76 |
+
if self.player == 'X' and self.computer_score == 9:
|
77 |
+
print('It is a draw!')
|
78 |
+
return
|
79 |
+
if self.player == 'O' and self.computer_score == 9:
|
80 |
+
print('Player {} wins!'.format(self.player))
|
81 |
+
return
|
82 |
+
|
83 |
+
if __name__ == '__main__':
|
84 |
+
game = Game()
|
85 |
+
game.play()<|endoftext|>
|
86 |
+
|
87 |
+
```
|
88 |
# Uploaded model
|
89 |
|
90 |
- **Developed by:** Ramikan-BR
|