Niveau 10.8 van PHP Problem Solver

Задание 1

Schrijf code die de complexiteit van een wachtwoord controleert. Bedenk zelf criteria voor complexiteit.

Задание 2

Gegeven een array. Toon op het scherm alle varianten van permutaties van de elementen van deze array.

Задание 3

Gegeven een formulier met twee inputvelden. Bij verzending van het formulier, toon een lijst met een ul van alle bevriende getallen uit het bereik, gespecificeerd door de waarden van de inputvelden.

Задание 4

Stel dat in een bestand JSON van steden is opgeslagen in de volgende vorm:

cities.json{
  [
    "id": "1",
    "city": "city1",
    "country": "country1",
  ],
  [
    "id": "2",
    "city": "city2",
    "country": "country1",
  ],
  [
    "id": "3",
    "city": "city3",
    "country": "country2",
  ]
}

Stel dat in een bestand JSON van landen is opgeslagen in de volgende vorm:

countries.json{
  [
    "id": "1",
    "country": "country1",
  ],
  [
    "id": "2",
    "country": "country2",
  ],
  [
    "id": "3",
    "country": "country3",
  ]
}

Schrijf een script dat in plaats van de landen hun id substitueert:

cities.json{
  [
    "id": "1",
    "city": "city1",
    "country_id": "1",
  ],
  [
    "id": "2",
    "city": "city2",
    "country_id": "1",
  ],
  [
    "id": "3",
    "city": "city3",
    "country_id": "2",
  ]
}