loubnabnl HF staff commited on
Commit
ad9b4e2
1 Parent(s): adbf59b

update examples

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -133,10 +133,10 @@ def generate(
133
 
134
 
135
  examples = [
136
- "def print_hello_world():",
137
- 'def fibonacci(n: int) -> int:\n """ Compute the n-th Fibonacci number. """',
138
- 'from typing import List, Tuple\n\ndef sum_and_product(numbers: List[int]) -> Tuple[int, int]:\n """ Return the sum and the product of the integers in the list as a tuple. Here is the answer of the exercise"""',
139
- "class ComplexNumbers:",
140
  ]
141
 
142
 
 
133
 
134
 
135
  examples = [
136
+ "X_train, y_train, X_test, y_test = train_test_split(X, y, test_size=0.1)\n\n# Train a logistic regression model, predict the labels on the test set and compute the accuracy score",
137
+ "// Returns every other value in the array as a new array.\nfunction everyOther(arr) {",
138
+ "<jupyter_text>Let's test our `is_prime` function:<jupyter_code>print(is_prime(3))\nprint(is_prime(4))\nprint(is_prime(29))\nprint(is_prime(33))<jupyter_output>",
139
+ "def alternating(list1, list2):\n results = []\n for i in range(min(len(list1), len(list2))):\n results.append(list1[i])\n results.append(list2[i])\n if len(list1) > len(list2):\n <FILL_HERE>\n else:\n results.extend(list2[i+1:])\n return results",
140
  ]
141
 
142