Skip to content

Commit

Permalink
calculate Boltzman and Avogadro number with resaults of the beadtracker
Browse files Browse the repository at this point in the history
  • Loading branch information
saadati944 committed Jan 14, 2021
1 parent ee2e881 commit c45c60b
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions avogadro.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import math
import stdlibrary.stdio as stdio

def main():
'''
this function will receive resaults of beadtracker
'''
inp = input().split('\n')
while not stdio.isEmpty():
inp.append(stdio.readFloat())

D = 0
for i in inp:
D += float(i)**2
D /= 2*len(inp)
D *= (175e-9)**2

# boltzman constant
k = (6 * D * math.pi * 9.135e-4 * 5e-7) / 297

# print resaults
print('Boltzman :', k, '\nAvogadro :', (8.31446/k))



if __name__ == "__main__":
main()

0 comments on commit c45c60b

Please sign in to comment.