Create a vector
Problem
Count 2 numbers:
n
- Numpy
vector size;
x
- the coordinate of the vector element, which must be equal to 1. The rest of the vector elements must be equal to 0 (\(0 <= x < ;n\)).
Save the vector to the variable V
.
Note. You do not need to print anything in this task. Only create vector V
.
Examples
# |
Input |
Output |
1 |
10
4 |
[0. 0. 0. 0. 1. 0. 0. 0. 0. 0.] |
Запрещенные операторы: if;for;while;do