Institut National des T´ ecommunications et des Technologies de l’information e
Institut National des T´ ecommunications et des Technologies de l’information et de la Communication Abdelhafid BOUSSOUF Module : Technologies web 2, 4eann´ ee TP 1 Exercice 1 — ´ Ecrire un script PHP qui permet de calculer la moyenne de trois nombres. — L’affichage doit ˆ etre comme suit : Nombre 1 = ... Nombre 2 = ... Nombre 3 = ... Moyenne = ... Exercice 2 — Corriger la page web (*.php) suivante : <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Exercice 5</title> </head> <body> <?php */ Ceci est un commentaire */ $a = 10; $b = $a - /* soustraction */ 3; ECHO "la valeur de a = $a"; echo ', la valeur de a = $a'; $Resultat = $a + $b; echo "<br> Le R´ esultat de a + b = $resultat "; > <p>Ok la valeur initial de a est 10 mais je ne connais pas encore la valeur de b !</p> <?php ECHO "la valeur de b = $b"; echo "<h3>", "C'est ", "la fin", " de l' exercice </h3>" ?> </body> </html> M. BOUMEDIENE Page 1/2 TP 1 - 15 janvier 2021 Institut National des T´ ecommunications et des Technologies de l’information et de la Communication Abdelhafid BOUSSOUF Exercice 3 — ´ Ecrire un script qui d´ etermine si un nombre est paire ou impaire. Exercice 4 — ´ Ecrire un script qui d´ etermine la mention ` a attribuer pour un bachelier en fonction de sa moyenne — Le bar` eme des mentions est le suivant : — Pas de mention : entre 10 et 12/20. — Assez bien : entre 12 et 14/20. — Bien : entre 14 et 16/20. — Mention tr` es bien : 16/20 et plus. Exercice 5 — ´ Ecrire un script PHP (page sport.php) qui d´ efinit un tableau de 4 sports olympiques d’hiver et qui les affiche dans un tableau html. Exercice 6 — Donner le script PHP qui g´ en` ere la table de multiplication d’un nombre par exemple celui de 6. Le r´ esultat doit ˆ etre affich´ e sous forme d’un tableau (table en html). M. BOUMEDIENE Page 2/2 TP 1 - 15 janvier 2021 uploads/Management/ php-tp1-2020-2021.pdf
Documents similaires
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/xyDHtAJlid5N42eDeheEHCdnWZHPR9NwIBBOpTmA1x2yvHzJBzENay0UpwIPXo1PpEKh78mIb37wyVvwvOU9lbIK.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/pkwkzAAIifV28TK6DvaXp9rd14YoEQ4Hp6FQfqrOftMioAtxQXbaVHIvZFHJo8nrhBlbL75WH3vq6Bmb92zthvth.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/o83XeEUvU13UehNCJgbxriwfFI9meriVuVepZL1gy9fgNtWNuQrO5AVfWkCyxkz8gwtOOdhspVFNArdesm9AWoDh.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/gus2RL46Y0Km5eqviYTpp9gVGUPvEhAw5NRHB2IsbHL5ki8Ji5qkyufqiXkBmFen3JW4cltsRW8gnHGeTg7hTUsr.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/fPV5z4Qdanh4RLZqcRnrfq1wPLgiYkqvvGf4jhH6RA6Kq7fIuUSQyCVsluF9VPrOwAR5cQoubUKcS9jt2qtppv50.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/v0ojsf8DSbooQfY1mcx8skTnrB7y2tJlsorHWLzWzJo3RbXLgsQp8woie5eOOO4eL9Wqq7pVnPkpIuj0cdPxudWv.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/BEtZfEo2j8KX8IXK6vs2WrZ0DtmZ9tWHdDcUtKHsgz9pxdAgsdxwQsKMbVcfWy9AGgRyIJ84lq0lS9jIW79zTVKk.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/AcZzxkuL7jmNMPIma757NaVo7JiCSp2ulZq8BAYAsJr73a9VgcDBSZOyH8TNmKjrFL7fXbDYlme5X9LJFMLxVlHh.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/jcZVaML7As7tYHANkfN6IzXLYEr5tINZGdcN1wS86Af87mvcm9546GcjnsZMBIDzT8zRkRdnHogyz9YFQIVhrqYb.png)
![](https://b3c3.c12.e2-4.dev/disserty/uploads/preview/IV9SzgCJZQcX1VzsnzPInv9hshSL2AaLG6LwUXINceWKPMeuG0KRF1jSbdlmreA9jCeemMVYwH020iauwSsfcS2n.png)
-
24
-
0
-
0
Licence et utilisation
Gratuit pour un usage personnel Attribution requise- Détails
- Publié le Oct 18, 2021
- Catégorie Management
- Langue French
- Taille du fichier 0.0920MB