add projects

This commit is contained in:
Tutur33
2023-11-30 18:56:50 +01:00
parent 7b6ff0ba9a
commit a775842dfd
16 changed files with 302 additions and 39 deletions
@@ -1,39 +0,0 @@
identifiants = {
"ale.lecouturier":"Huz4",
"lea.martin":"monty"
}
#identifiant = input("Identifiant : ")
#motdepasse = input("Mot de passe : ")
def f():
if identifiant.get() in identifiants and motdepasse.get() == identifiants[identifiant]:
print(True)
else:
print(False)
from tkinter import *
fenetre = Tk()
label = Label(fenetre, text="Identifiant :")
label.pack()
identifiant = Entry(fenetre, width=30)
identifiant.pack()
label = Label(fenetre, text="Mot de passe :")
label.pack()
motdepasse = Entry(fenetre, width=30)
motdepasse.pack()
bouton = Button(fenetre, text="Se connecter", command=f)
bouton.pack()
fenetre.mainloop()
Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

@@ -0,0 +1,24 @@
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculatrice</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Calculatrice 4 operation</h1>
<img src="calculatrice.jpg" alt="">
<h2>Saisir un nombre, choisir un signe, saisir un second nombre puis cliquer sur =</h2>
<form method="post" action="calculatrice2.php">
<input type="text" name="nbr1">
<select name="jour_du_mois">
<option value="+">+</option>
<option value="-">-</option>
<option value="*">*</option>
<option value="/">/</option>
<input type="text" name="nbr2">
<button type="submit">=</button>
</form>
</body>
</html>
@@ -0,0 +1,35 @@
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculatrice</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Calculatrice 4 operation, resultat :</h1>
<h2>
<?php
if (strcmp($_POST['jour_du_mois'], "+") == 0)
{$resultat = $_POST['nbr1'] + $_POST['nbr2'];
print ("résultat = $resultat");
}
if (strcmp($_POST['jour_du_mois'], "-") == 0)
{$resultat = $_POST['nbr1'] - $_POST['nbr2'];
print ("résultat = $resultat");
}
if (strcmp($_POST['jour_du_mois'], "/") == 0)
{$resultat = $_POST['nbr1'] / $_POST['nbr2'];
print ("résultat = $resultat");
}
if (strcmp($_POST['jour_du_mois'], "*") == 0)
{$resultat = $_POST['nbr1'] * $_POST['nbr2'];
print ("résultat = $resultat");
}
?>
</h2>
</body>
</html>
+7
View File
@@ -0,0 +1,7 @@
body {
background-color: yellow;
}
img {
width: 150px;
}
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calendrier</title>
</head>
<body>
<form action=""></form>
</body>
</html>
+20
View File
@@ -0,0 +1,20 @@
body {
background-color: gray;
}
td {
width: 50px;
height: 50px;
}
table {
border-collapse:collapse;
}
.n {
background-color: black;
}
.b {
background-color: white;
}
+20
View File
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Damier</title>
<link rel="stylesheet" href="damier.css">
</head>
<body>
<form method="post" action="damier2.php">
<label for="ligne">ligne</label>
<input type="text" name="ligne" require>
<label for="colum">colone</label>
<input type="text" name="colum" require>
<button type="submit">ok</button>
</form>
</body>
</html>
+41
View File
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Damier</title>
<link rel="stylesheet" href="damier.css">
</head>
<body>
<table>
<?php
$ligne = $_POST['ligne'];
$colone = $_POST['colum'];
$color = 'b';
for ($i=0; $i<$ligne ; $i++) {
echo("<tr>");
for ($j=0; $j<$colone ; $j++) {
if ($color == 'b') {
$color = 'n';
} else {
$color = 'b';
}
echo("<td class='$color'></td>");
}
echo("</tr>");
if ($i % 2 == 0) {
$color = 'n';
} else {
$color = 'b';
}
}
?>
</table>
</body>
</html>
@@ -0,0 +1,12 @@
body {
background-color: floralwhite;
}
h1,
h2 {
color: blue;
}
.ne {
display: flex;
}
@@ -0,0 +1,31 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculatrice</title>
<link rel="stylesheet" href="ne_e_quel_jour.css">
</head>
<body>
<h1>Quel jour de la semaine êtes-vous (e) ?</h1>
<form method="post" action="ne_e_quel_jour2.php">
<div>
<h2>Votre prénom : </h2>
<input type="text" name="prenom" require>
</div>
<h3>Votre date de naissance SVP ?:</h3>
<div class="ne">
<h2>Jour du mois : </h2>
<input type="text" name="jours" require>
<h2>mois : </h2>
<input type="text" name="mois" require>
<h2>année : </h2>
<input type="text" name="annees" require>
</div>
<input type="submit">
</form>
</body>
</html>
@@ -0,0 +1,46 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Calculatrice</title>
<link rel="stylesheet" href="ne_e_quel_jour.css">
</head>
<body>
<h1>Quel jour de la semaine êtes-vous (e) ?</h1>
<h3>
<?php
$nbr = $_POST['jours'];
$mois = $_POST['mois'];
$annees = $_POST['annees'];
if ($mois<3) {
$jour = ( (int)((23*$mois)/9)+$nbr+4+$annees+((int)($annees-1)/4)-(int)(($annees-1)/100)+(int)(($annees-1)/400) )%7;
} else {
$jour = ( (int)((23*$mois)/9)+$nbr+2+$annees+(int)($annees/4)-(int)($annees/100)+(int)($annees/400) )%7;
}
$nom = $_POST['prenom'];
if ($jour == 0) {
$jour = "dimanche";
} elseif($jour == 1) {
$jour = "lundi";
} elseif($jour == 2) {
$jour = "mardi";
} elseif($jour == 3) {
$jour = "mercredi";
} elseif($jour == 4) {
$jour = "jeudi";
} elseif($jour == 5) {
$jour = "vendredi";
} elseif($jour == 6) {
$jour = "samedi";
}
print("$nom, vous êtes né(e) un $jour.");
?>
</h3>
</body>
</html>
+27
View File
@@ -0,0 +1,27 @@
<!-- lasphere.php -->
<html>
<head>
<title> La sphere </title>
</head>
<body bgcolor="yellow" text="blue">
<h1> <font color="black"> Calcul de l'aire de la surface ou du volume d'une sphere </font> </h1>
<BR>
<img src="sphere.jpg"WIDTH=120 HEIGHT=86 TITLE="code Html" />
<!-- edition du formulaire -->
<!-- Lors de sa validation par le clic sur le bouton "Envoyer" de type "submit",
les données sont envoyées au serveur par la methode POST pour etre exploitees
au sein de la page lasphere2.php -->
<form method="post" action="lasphere2.php">
<p>
<input type="radio" name="sphere" value="aire" /> Aire
<input type="radio" name="sphere" value="volume" checked="checked" /> Volume
<BR>
Rayon en m: <input type="text" name="rayon" />
<input type="submit" value="Envoyer" />
</p>
</form>
</body>
</html>
+28
View File
@@ -0,0 +1,28 @@
<!-- lasphere2.php -->
<html>
<head>
<meta charset="UTF-8">
<title> La sphere </title>
</head>
<body bgcolor="yellow" text="blue">
<h1> <font color="black"> Aire ou volume d'une sphere, le resultat:</font> </h1>
<h2>
<!-- Code PHP -->
<?php
/* Comparaison de la chaine de caracteres (string en anglais) reçue de la partie
"sphere" du formulaire */
// Si la chaine contient la valeur "aire", alors on calcule l'aire de la sphere.
if (strcmp($_POST['sphere'], "aire") == 0)
{$resultat = 4 * 3.14 * $_POST['rayon'] * $_POST['rayon'];
print ("Aire = $resultat");
}
// Si la chaine contient la valeur "volume", alors on calcule le volume de la sphere.
if (strcmp($_POST['sphere'], "volume") == 0)
{$resultat = 4/3 * 3.14 * $_POST['rayon'] * $_POST['rayon'] * $_POST['rayon'];
print ("Volume = $resultat m3");
}
?>
<!-- Fin du code PHP -->
</h2>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB