if (getInputValue().includes(arrayQA))
let q = arrayQA.find(item => item.question === getInputValue())
function randomInteger(min, max) // функция принимает на вход 2 числа
return randomInteger(answer); // а здесь почему-то передается несуществующая переменная answer
lst = {
"applist": {
"apps": [{
"appid": 1941401,
"name": "ASD"
}, {
"appid": 2170321,
"name": "SDF"
}, {
"appid": 1825161,
"name": "DFG"
}]
}
}
def find_name(appid):
if res := list(filter(lambda x: x['appid'] == appid, lst['applist']['apps'])):
return res[0]['name']
return None
let mass1 = ["zn1", "zn2", "zn3"]
let mass2 = [
{t1: "aa", p1: "lot"},
{t1: "ab", p1: "kot"},
{t1: "ac", p1: "mot"}
]
let mass3 = []
for (let i = 0; i < mass1.length; i++) {
mass3.push(
Object.assign(mass2[i], {head: mass1[i]})
)
}
@input="$emit('update:modelValue', $event.target.value)"
@keyup.enter="modelValue = $event.target.value"
kb.row(KeyboardButton('Когда', 'Помощь'))
kb.row(KeyboardButton('Когда'), KeyboardButton('Помощь'))
let statuses = document.querySelectorAll('.M')
statuses.forEach((item) => {
if (item.innerText === 'Активен') {
item.classList.add('Free')
}
if (item.innerText === 'Заблокирован') {
item.classList.add('Blocked')
}
}
)
<MyStatus
class="M"
:class="{'Free': item.Status==='Активен', 'Blocked': item.Status==='Заблокирован'}"
style="width: 75%; padding: 0.25em 0.75em"
>
{{ player.Status }}
</MyStatus>
from random import randint
attempts = []
for i in range(10):
res = []
while True:
res.append(randint(0, 1))
if len(res) >= 3 and (res[-1]==res[-2]==res[-3]):
break
s = ''.join(['О' if s else 'Р' for s in res])
print(f'{s} (попыток: {len(s)})')
attempts.append(len(s))
print(f'Среднее количество попыток: {sum(attempts) / len(attempts)}.')
<div v-if="game.Winner=== game.Player1Name">тут кубок</div>
const $player1 = document.querySelector('player1')
if k == 10:
continue
async def send_random_quote(message_id):
x= quotes[randint(0,388)]
await bot.send_message(message_id, x)
scheduler.add_job(send_random_quote,'cron',day_of_week='mon-sun', hour=19,minute=6,kwargs={'message_id': callback_query.from_user.id})
app = FastAPI()
app_api = FastAPI()
app.mount("/api", app_api)
app.mount("/", StaticFiles(directory="static", html=True), name="static")
@app.get('/', response_class=HTMLResponse)
async def main_page():
return HTMLResponse('index.html')
@app_api.post('/login', response_class=JSONResponse)
async def login(
username: str = Body(...),
password: str = Body(...)
):
...
grid-template-columns: 1fr 1fr 1fr 1fr;