https://github.com/alexandresanlim/Badges4-README.md-Profile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const requestURL = 'https://jsonplaceholder.typicode.com/users' | |
function sendRequest(method, url, body = null) { | |
const headers = { | |
'Content-Type': 'application/json' | |
} | |
return fetch(url, { | |
method: method, | |
body: JSON.stringify(body), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const citiesRussia = ['Москва', 'Санкт-Петербург', 'Казань', 'Новосибирск'] | |
const citiesEurope = ['Берлин', 'Прага', 'Париж'] | |
const citiesRussiaWithPopulation = { | |
Moscow: 20, | |
SaintPetersburg: 8, | |
Kazan: 5, | |
Novosibirsk: 3 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const myNumber = 42 | |
localStorage.removeItem('number') | |
console.log(localStorage.getItem('number')) | |
localStorage.setItem('number', myNumber.toString()) | |
console.log(localStorage.getItem('number')) | |
localStorage.clear() | |
const object = { | |
name: 'Max', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zero(func) { return func ? func(0) : 0; }; | |
function one(func) { return func ? func(1) : 1; }; | |
function two(func) { return func ? func(2) : 2; }; | |
function three(func) { return func ? func(3) : 3; }; | |
function four(func) { return func ? func(4) : 4; }; | |
function five(func) { return func ? func(5) : 5; }; | |
function six(func) { return func ? func(6) : 6; }; | |
function seven(func) { return func ? func(7) : 7; }; | |
function eight(func) { return func ? func(8) : 8; }; | |
function nine(func) { return func ? func(9) : 9; }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------Числа Фебоначчи до нужного количества---------------------------- | |
// let fibonacciNumbers = [1, 1]; | |
// let numbersQuantity = 7; | |
// // let quanrity = 0 | |
// for (let i = numbersQuantity; i > 0; i--) { | |
// fibonacciNumbers.push(fibonacciNumbers[fibonacciNumbers.length - 1] + fibonacciNumbers[fibonacciNumbers.length - 2]); | |
// } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = open('input.txt', 'r') | |
num = int(data.readline().rstrip()) | |
# print(f'входно число- {num}') | |
data.close() | |
list_simple = [] | |
i = 2 | |
while i * i <= num: | |
while num % i == 0: | |
list_simple.append(i) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Задача на сложение двоичных чисел ------------ | |
data = open('input.txt', 'r') | |
n_1 = list(map(int, data.readline().rstrip())) | |
n_2 = list(map(int, data.readline().rstrip())) | |
# print(n_1) | |
# print(n_2) | |
data.close() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Добавить в начале строки Найти ^ Заменить 0; | |
^\W пробел в начале строки | |
\d{8} найти 8 цыфр подряд | |
^\d{4};92 найти В НАЧАЛЕ ЧЕТЫРЕХзначные числа после которы есть ;92 | |
[^=]*$ любые символы, кроме "=" | |
;(.*) все после ; | |
(\b\S+\b)(?=.*\1) повторение на строке | |
\d [0-9] Цифровой символ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# на вход через пробел подаются числа a, x, b, c.--------------------- | |
import sys | |
line = sys.stdin.readline().rstrip() | |
a, x, b, c = map(int, line.split(' ')) | |
y = a*x*x + b*x + c | |
print(y) | |
NewerOlder