Python
- 4 ответа
- 0 вопросов
4
Вклад в тег
>>> html.info()
<http.client.HTTPMessage object at 0x10aef1518>
>>> html.info().items()
>>> data = html.read()
>>> import gzip
>>> gzip.decompress(data)
>>> import requests
>>> response = requests.get("https://wallpaperscraft.ru")
>>> response.content
bot.t()
longpoll.t(bot) # bot это и будет self в методе t
#include <iostream>
void printPolynom(double* coefs, int degree, std::ostream& os)
{
static const char VAR = 'x';
bool first = true;
for (int i = degree; i >= 0; --i) {
double coef = *coefs;
coefs++;
if (!first && coef > 0.0) {
os << "+";
}
first = false;
os << coef;
for (int j = 0; j < i; ++j)
os << '*' << VAR;
}
}
int main()
{
const int degree = 3;
double coefs[degree + 1] = { 9, 3, 12, -1 };
printPolynom(coefs, degree, std::cout);
std::cout << "\nDone";
return 0;
}