Elab Python 1
Elab Python 1
Niveau 1
Athika et Ritu ont obtenu un bon emploi
float(saisie())
sal=de base+(de base*0.8)+(de base*0.4)
print(f"{sal:.2f}")
r=float(input(""))
s1=float(input(""))
float(input(""))
float(input(""))
s=(s1+s2+s3)/2
degré=input()
S=int(input())
print("La plage des données données =", G-S)
heures=int(input())
minutes=int(input())
secondes=int(input())
imprimer(jours*86400+heures*3600+minutes*60+secondes)
l=float(input())
b=float(input())
print("{:.2f}".format(l*b))
Le professeur de mathématiques de Thanvi a enseigné
r=float(input())
pi=3.142
print(4/3*pi*r**3)
Nancy a acheté des pommes
n1=int(input())
n2=int(input())
quotient:{} reste:{}
num2=int(input())
Soustraction :
En géométrie, l'aire
r=float(input())
w=int(input())
imprimer ((2*(w*l+1*h+h*w)))
Binita voyageait
tme=int( input ()) min-tme`
(tme - min) / 66
Niveau 2
Caleb est un physicien
importer math
d=float(input())
print("{:.2f} m/s".format(math.sqrt(2*d*9.8)))
Arav était un formateur de mathématiques populaire
num=int(input())
print(num%10)
Surya avait l'habitude de porter
tme = int(input())
%= 3600
{}H:{}M:{}S
r=float(input())
pi=3.14
print(f"{(pi*r**2):.2f}\n{(2*pi*r):.2f}")
Isaac aimait travailler
pieds_carrés = float(input())
lst=input().split()
a=entrée()
imprimer(int(a)+int(a+a)+int(a+a+a)+int(a+a+a+a))
n=int(input())
Prix Régulier
imprimer(f"{b*h/2:.3f}")
Le rêve d'Arulmozhivarman
importer math
Karthik travaillait
hrs=float(input())
s=float(input(
J'ai {} dollars, donc je peux acheter {} ballons de football pour {:.2f} dollars.
t=int(input())
print(int(ap[1])-int(ap[0])+int(ap[t-2]))
Opération XOR bit à bit des entiers
xor=input().split(" ")
imprimer(int(xor[0])^int(xor[1]))
tme = int(input())
tme %= 3600
tme %= 60
print("La durée est de {} jours {} heures {} minutes {} secondes".format(jour, heure, minutes, temps))
Tina a réussi
salaireDeBase = float(input())
employeeFund = 17.5
employerFund = 23.5
imprimer("{:.2f}".format(partEmploye)) imprimer("{:.2f}".format(partEmployeur))
y=int(n/365)
d=n%365
m=int(d/30)
x = (x1 + x2 + x3) / 3
y = (y1 + y2 + y3) / 3
imprimer(f"({x:.2f},{y:.2f})")
exp=float(input())
print(f"{base**exp:.2f}")
t=int(input())
Madhan travaillait
km=float(input())
(km*100000:.2f} cm
J'ai {d1} dollars, donc je peux acheter {i} un ballon de football pour {d2:.2f} dollars.
Mode=(3*m)-(2*n)
imprimer(a+2)
b=float(input())
c=float(input())
d=float(input())
e=float(input())
g=((a+b+c+d+e)/500)*100
imprimer(f"{g:.2f} Pourcent")
si g>=90 :
Imprimer("Note A")
elif g>=80:
imprimer("Note B")
elif g>=70:
imprimer("Grade C")
elif g>=60 :
imprimer("Note D")
elif g >= 40 :
Imprimer("Note E")
sinon :
imprimer("Note F")
a=entrée()
si a.estalpha() :
imprimer("ALPHABÉT")
sinon :
PRINT("PAS UN ALPHABÉTIQUE")
w=int(input())
si 1<=a<=120 :
si 25 <= w <= 85 :
sinon :
sinon :
Caleb et Salima
a=int(input())
b=int(input())
si a>b :
imprimer(a-b)
sinon :
imprimer(a+b)
Célébrité et Irfan
a1=int(input())
a2=int(input())
a3=int(input())
sinon :
a=int(input())
si 0<a :
imprimer("POSITIF")
sinon :
NÉGATIF
Simon travaillait
a=int(input())
si 0<a :
imprimer("POSITIF")
sinon :
IMPRIMNER("NÉGATIF")
M. Issac le chef
f=float(input())
c=(f-32)*(5/9)
imprimer(f"{c:.2f} Centgrade")
si c>=150 :
Très chaud
elif c>=100:
Imprimer("Chaud")
sinon :
Modéré
i = float(input())
si(w%5==0 et w<i):
t = i - w - 0,5
imprimer("Solde actuel :","%.2f"%t)
elif(w>i):
sinon :
b=int(input())
si a>b:
imprimer(a-b)
sinon :
imprimer(b-a)
Paytm a annoncé
a=int(input())
b=a%2
si b == 0 :
imprimer("Monnaie Pair")
sinon :
Monnaie Bizarre
Shree et Harry
valeur1 = float(input())
valeur2 = float(input())
si valeur1 > valeur2 et valeur1 - valeur2 == 0.5 :
imprimer("Nombre approximatif")
Nombre approximatif
sinon :
print("Pas un Nombre Approximatif");
Salima travaillait
a=int(input())
b=float(input())
c=int(input())
(b**2)-(4*a*c)
si le discriminant > 0 :
racine1=(-b+(discriminant**0.5))/(2*a)
print(f"{root1:.2f},{root2:.2f}")
sinon :
partie_réelle=-b/(a)
(abs(discriminant)**0.5)/(2*a)
imprime(f"{real_part/2:.2f} + i{imaginary_part:.2f} et {real_part/2:.2f} - i{imaginary_part:.2f}")
Arulmozhivarman le fameux
c=entrée()
a=float(input())
b=float(input())
si c=="*":
imprimer(a*b)
elif c=="+:"
imprimer(a+b)
elif c=="-":
print(a-b)
elif c=="/":
imprimer(a/b)
sinon :
print("Entrée Invalide")
Tableaux et Boucles
Niveau 1
Akarh le die hard
n = int(input())
pour i dans la plage(n, 0, -1):
a1.append([])
pour j dans la gamme(col):
l = int(input())
a1[i].append(l)
pour i dans range(ligne):
a2.append([])
pour j dans la plage(col):
l = int(input())
a2[i].append(l)
pour i dans la plage(ligne) :
result.append([])
pour j dans la plage(col) :
result[i].append(a1[i][j] + a2[i][j])
pour i dans la plage(row) :
si nombres[j]%2==0 :
even.append(numbers[j])
sinon :
odd.append(nombre[j])
pour i dans la plage(0,len(pair)):
print(even[i],end=" ")
imprimer()
pour j dans la plage(0,len(impair)):
print(impair[j],end=" ")
print("*",end=" ")
line = []
pour j dans la plage(ord('a'), ord('a') + i):
line.append(chr(j))
patern_list.append(ligne)
pour ligne dans patern_liste :
Ganapathy le Mathématiques
n = int(input())
pour i dans la plage(1, n + 1):
si i % 2 == 1 :
imprimer("Passer", fin=" ")
sinon :
imprimer("Échouer", fin=" ")
imprimer()
r = int(input())
c = int(input())
matrix = []
pour j dans la plage(r):
a = []
pour j dans la plage(c):
a.append(int(input()))
matrix.append(a)
pour j dans range(c) :
r = int(input())
c = int(input())
matrix = []
pour j dans la plage(c) :
a = []
pour j dans la plage(r):
a.append(int(input()))
matrix.append(a)
pour i dans la plage(c) :
print(matrix[i][j],end=" ")
imprimer()
a=int(input())
lst.append(a)
lst1=lst.trier()
si n%2==0 :
somme=lst[int(n/2)-1]+lst[int(n/2)]
med=sum/2
sinon :
med=lst[int(n/2)]
imprimer(méd)
si i % 3 == 0 ou i % 5 == 0 :
fac.append(i)
sum = 0
pour i dans fac :
somme = somme + i
imprimer(somme)
Mukesh et Salima
n = int(input())
a=[]
count = 0
pour i dans la plage(0, n):
l = int(input())
a.append(l)
pour i dans la plage(0, n):
si a[i] == a[j]:
compte = compte + 1
pause
imprimer(compte)
Chiffres
Niveau 1
Il y a N étudiants
t=int(input())
tant que t > 0 :
s=entrée()
p,res=0,0
tant que p+1<len(s):
if(s[p]!=s[p+1]):
res=res+1
p=p+1
p=p+1
imprimer(res)
t=t-1
étudiants=str(input())
# i=len(étudiants)
# sinon