Created
October 19, 2018 00:05
-
-
Save thiagodeschamps/9db12fc0c44e4ed2e582bb21994c4b01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sovem(): | |
print("\n", 55*"=", "\n") | |
def coleta(): | |
sovem() | |
print(" Bem-vindo ao calculador de Incertezas Combinadas!") | |
sovem() | |
vet = [] | |
cont = int(input('Digite a quantidadw de medidas: ')) | |
for i in range(0, cont): | |
m = float(input(f'\n{i+1}ª: ')) | |
vet.append(m) | |
print("\nMedidas: ", vet) | |
sd(vet) | |
def sd(vector): | |
n = len(vector) | |
var = 0 | |
media = sum(vector)/n | |
inB = float(input('Digite a incerteza do tipo B (a do instrumento): ')) | |
for i in vector: | |
var += ((i - media)**2) | |
desv = ((var/(n - 1))**(1/2)) | |
inf = ( (desv**2) + (inB**2) )**(1/2) | |
sovem() | |
print(' Incerteza combinada: ',inf) | |
sovem() | |
coleta() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment