A
A
arsfilinov2021-03-30 10:35:53
JavaScript
arsfilinov, 2021-03-30 10:35:53

How to display a variable in a picture Python?

I'm trying to make a bot for VKontakte and I want to make a profile in a picture, not text. How to display a variable in an image?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivanq, 2018-04-09
@Swaer

let arr = .reduce(function(a, b) {
  return a.concat(b);
});

var result = [];
while(result.length < 6) {
  let sum = Math.floor(Math.random() * (arr.length - 0)) + 0;
  if(result.indexOf(arr[sum]) == -1) { // Проверяем
    result.push(arr[sum]);
  }
}

For a (small) speedup, you can separately copy the unique arr. I.e:
let arr = .reduce(function(a, b) {
  return a.concat(b);
});

let unique = arr.filter((val, i) => arr.indexOf(val) == i);

var result = [];
while(result.length < 6) {
  let sum = Math.floor(Math.random() * (unique.length - 0)) + 0;
  if(result.indexOf(unique[sum]) == -1) { // Проверяем
    result.push(unique[sum]);
  }
}

M
MinTnt, 2021-03-30
@MinTnt

I didn’t really understand the question, but it seems you mean the PIL library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question