html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ajout_equipe</title>
<style>
body{
background-color: lightsalmon;
}
@keyframes anim1{
0%{
color:blue;
}
20%{
color: black;
font-style: dotted;
text-tansform: uppercase;
}
40%{
color: white;
font-style:italic;
background-color: black;
border-style: dashed;
text-transform: capitalize;
}
60%{
color:red;
font-style: normal;
background-color: green;
border-style:double;
text-transform: lowercase;
}
80%{
color: green;
font-style: italic;
background-color: blanchedalmond;
border-style: solid;
text-transform: uppercase;
}
100%{
color: brown;
font-style: normal;
background-color: darkslateblue;
border-style: dotted;
text-transform: capitalize;
}
}
h1{
text-align: center;
color: blue;
background-color: white;
border: solid thick brown;
border-radius: 20px;
margin-right: 30%;
padding-top: 5px;
padding-bottom: 5px;
animation-name: anim1;
animation-duration: 3s;
animation-delay: 2s;
animation-iteration-count:infinite;
}
form{
background-color: azure;
border: solid thick brown;
border-radius: 20px;
margin-right: 30%;
margin-left: 30%;
}
div{
padding: 4px;
text-align: center;
}
fieldset{
border: solid thick brown;
border-radius: 20px;
}
legend{
background-color: coral;
border: solid thick brown;
border-radius: 20px;
font-size: 25px;
color: white;
}
label{
font-family: verdana;
font-style: italic;
font-size: 16px;
font-weight: bold;
color:brown;
text-shadow: red 2px 2px;
text-transform: uppercase;
display: inline-block;
}
input[type="submit"],input[type="reset"]{
background-color: black;
color: white;
font-weight: bold;
border : solid thick gray;
border-radius: 20px;
padding: 5px 15px;
}
legend:hover,input[type="submit"]:hover,input[type="reset"]:hover{
transform:scale(1.5);
}
label:hover{
transform: skew(-20deg,-20deg);
}
#a,#b,#c{
background-color: lightgreen;
border-radius: 10px;
}
h2{
transform: rotate(30deg);
color:aquamarine;
text-decoration: underline;
}
</style>
</head>
<body>
<h1>Ajout d'une nouvelle équipe</h1>
<form name="f" method="post" action="ajout.php" onsubmit="return verif()">
<fieldset>Saisie_Equipe</fieldset>
<div>
<label for="a">code : </label><input type="text" id="a" name="a">
</div>
<div>
<label for="b">nom : </label><input type="text" id="b" name="b">
</div>
<div>
<label for="c">création : </label><input type="date" id="c" name="c">
</div>
<div>
<input type="submit" value="Envoyer">
<input type="reset" value="Annuler">
</div>
</form>
</body>
</html>
python
from PyQt5.uic import loadUi
from PyQt5.QtWidgets import QApplication
def calculer():
a=(w.x.text())
b=(w.y.text())
if (a=="") or (b==""):
QMessageBoxwarning("veuiller saisir des valeur")
elif not(a.isdecimal() and b.isdecimal()):
QMessageBoxwarning("veilller saisir des valeurs numériques")
elif not((w.br1.isChecked()) or (w.br2.isChecked()) or (w.br3.isChecked()) or (w.br4.isChecked())):
QMessageBoxwarning("veiller cocher une case")
elif w.br1.isChecked():
c=int(a)+int(b)
w.r.setText(str(c))
elif w.br2.isChecked():
c=int(a)-int(b)
w.r.setText(str(c))
elif w.br3.isChecked():
c=int(a)*int(b)
w.r.setText(str(c))
elif w.br4.isChecked():
c=int(a)/int(b)
w.r.setText(str(c))
app = QApplication([])
w = loadUi ("Interface.ui")
w.show()
w.b1.clicked.connect (calculer)
app.exec_()