Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Sun Nov 20 13:33:56 2016
- @author: thoma
- """
- R = 1 * 10 ** 6
- C = 10 * 10 ** -9
- L = 0.1
- import numpy as np
- w0 = 1/np.sqrt(L * C)
- Q = R * np.sqrt(C / L)
- print(-1 * w0 / 2 / Q + (w0 + w0 / 4 / (Q*Q)))
- print(w0 / 2 / Q + (w0 + w0 / 4 / (Q*Q)))
- print(w0)
- print(31672*7.3/31622)
- # 7,3 -> 31622
- # x -> 31672
- listemodules=["E","F","Q","C","M"]
- listescore=["+","=","-"]
- def f(liste):
- compte=0
- if len(liste)==0:
- for i,lettre in enumerate(listemodules):
- for j,signe in enumerate(listescore):
- resultat=listemodules[i] + listescore[j]
- liste.append(resultat)
- elif ((len(liste)!=0) and (compte<=len(listemodules))):
- for zz,el in enumerate(liste):
- for i,lettre in enumerate(listemodules):
- for j,signe in enumerate(listescore):
- resultat=liste[zz] + listemodules[i] + listescore[j]
- liste.append(resultat)
- compte+=1
- return f(liste)
- print(f([1,2,3,4,5]))
- largeur, hauteur = 4, 3
- matrice = [[0 for j in range(hauteur)] for i in range(largeur)]
- print(matrice)
- # -*- coding: utf-8 -*-
- """
- Created on Sun Nov 20 14:49:28 2016
- @author: thoma
- """
- import sys
- sys.setrecursionlimit(1000000)
- import numpy as np
- def u(n):
- return np.sqrt(2) * np.log(n) / n ** (3/2)
- def S(n):
- if n > 2:
- retour = S(n - 1)
- retour.append(retour[len(retour) - 1] + u(n))
- return retour
- else:
- return [u(2)]
- import matplotlib.pyplot as plt
- maxi = 2500
- x = [n for n in range(2, maxi + 1)]
- y = S(maxi)
- y2 = [np.log(n) for n in x]
- y3 = [y2[i] / y[i] for i in range(len(x))]
- plt.plot(x, y)
- plt.plot(x, y2)
- plt.plot(x, y3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement