Voici les résultats de votre recherche.
notions_fondamentales @teaching:progappchim 77 Occurrences trouvées, Dernière modification : il y a 23 mois le langage lui-même (if, elif, while, for, else, print ,...).
* Instruction d'**affectation** utilisant... hage de sa valeur ; Dans un programme, on utilise print . Le nombre de chiffres affichés peut varier (essayer par exemple "1/3". et "print (1/3.)")
* **Typage automatique**. Attention au... e). Exemple :
<code python>
a = 0
if a > 0 :
print ("a est positif")
print ("car il est strictemen numpy_simple @teaching:progappchim 47 Occurrences trouvées, Dernière modification : il y a 2 ans n>
import numpy as np
a = np.array([[1,2],[3,4]])
print (a)
print (a.dtype)
</code>
Sortie :
<code>
[[1 2]
[3 4]]
<type 'numpy.ndarray'>
</code>
<note tip>Pour d... de dimensions, les dimensions, le type de donnée
print (a, a.ndim, a.shape, a.dtype)
# avec des "floats" ... 6.6, 7.7, 8.8],
[9.9, 0.2, 1.3, 2.4],
])
print (b, b.ndim, b.shape, b.dtype)
# un tableau de zéro elements_molecules @teaching:progappchim 39 Occurrences trouvées, Dernière modification : il y a 4 ans (ELEMENTS)
str(ELEMENTS[109])
ele = ELEMENTS['C']
print (ele.number, ele.symbol, ele.name, ele.eleconfig)
print (ele.eleconfig_dict)
print (sum(ele.mass for ele in ELEMENTS))
for ele in ELEMENTS:
ele.validate()
ele = repr(ele)
print (ele, type(ele))
input("next ?")
</code>
<cod presentation_principes @teaching:progappchim 31 Occurrences trouvées, Dernière modification : il y a 2 ans 15
>>> T=20+zero
>>> P=n*R*T/V
>>> atm=101325
>>> print (P,P/atm)
101555.51000000001 1.0022749568221072
>>... ro=6.02214199E23
>>> kboltzmann=1.3806505E-23
>>> print (Navogadro*kboltzmann)
8.31447334956
>>> 2**0.5
1.... > a=’bonjour’
>>> b="bonjour"
>>> c=’Bonjour’
>>> print (a==b,a==c)
True False
>>> d="pâté123#"
>>> print d
pâté123#
>>> é=d
>>> long="""un
deux
...
dix"""
>>> p articles_didactique_chimie 28 Occurrences trouvées, Dernière modification : il y a 7 semaines 10.1021/acs.jchemed.8b01034|Influence of Exam Blueprint Distribution on Student Perceptions and Performan... //pubs.acs.org/doi/10.1021/acs.jchemed.7b00549|MolPrint 3D: Enhanced 3D Printing of Ball-and-Stick Molecul... s/10.1021/ed500406v|Activities Designed for Fingerprint Dusting and the Chemical Revelation of Latent Fin... s/10.1021/ed500406v|Activities Designed for Fingerprint Dusting and the Chemical Revelation of Latent Fin simulations_random_walks_codes @teaching:exos 21 Occurrences trouvées, Dernière modification : il y a 6 ans ice : random choice of an element from a list
print (choice(facepiece), choice(valeurpiece))
# ran... er number between 2 values (including limits)
print (randint(0,10)) # imprime un nombre aléatoire entre 0 et 10
print (choice(range(0,11,1))) # same function, using ch... ate the generator
for i in range(10):
print (randint(1000,9999))
print (" ")
</code>
===== solvents_data_class @teaching:progappchim 21 Occurrences trouvées, Dernière modification : il y a 12 ans chemical formula
def table(solvent_list):
"""print a table of all solvent attributes"""
title_st... 1f %8.3f %8.2f %8.2f %8.2f %8.2f %-20s"
print "-"*122
print title_str % ("Name", "Bp", "Mp", "Fp", "Density", "Dielect", "Ref. Ind", "Dipole", "H2... ormula")
for solvent in solvent_list:
print data_str % (solvent.name, solvent.bp, solvent.mp, bioinformatic @teaching:progappchim 20 Occurrences trouvées, Dernière modification : il y a 3 ans
bases = ["A","C","G","T"]
for base in bases:
print (adn.count(base),)
print ()
# Variante :
for c in 'ACGT':
print (adn.count(c),)
print ()
# variante un peu moins lisible
out = []
for c in 'ACGT':
out.append(str(adn suite_de_fibonacci-5 @teaching:progappchim 19 Occurrences trouvées, Dernière modification : il y a 8 ans _item_logarithmic
if __name__ == '__main__':
print ("Calculs exemples préliminaires...")
i=int(in... . Donnez l'indice de l'élément souhaité ? "))
print ("Élément de la suite : "),
if i <= 10: print (fibonacci_item_recursive(i))
print (fibonacci_item_from_list(i))
print (fibonacci_item(i))
pri suite_de_fibonacci-3 @teaching:progappchim 16 Occurrences trouvées, Dernière modification : il y a 8 ans . Donnez l'indice de l'élément souhaité ? "))
print ("Élément de la suite : "),
print (fibonacci_item(i))
print ('Premiers éléments de la suite : ')
for j in range(10):
print (j,fibonacci_item(j))
</code>
On peut compléter l slices @teaching:progappchim 14 Occurrences trouvées, Dernière modification : il y a 3 ans dices modulo len(seq...)
"""
a=[1,3,5,7,11,13,15]
print "liste exemple : ",a
b=a[1:4:1]
print b # [3, 5, 7]
print a[:5] # [1, 3, 5, 7, 11]
print a[3:] # [7, 11, 13, 15]
print a[-3:] # [11, 13, 15]
# un élément sur 2 :
mendeleev @teaching:progappchim 13 Occurrences trouvées, Dernière modification : il y a 2 ans for i in range(1,108)]
for i in range(1,108):
print (x[i-1], y[i-1])
plt.figure()
plt.plot(x, y)
plt.... aux valeurs en utilisant le symbole de l'élément
print (element('Na').atomic_number)
print (element('Na').melting_point)
print (element('Na').boiling_point)
# on peut aussi accéder aux mêmes valeu pandas @teaching:progappchim 12 Occurrences trouvées, Dernière modification : il y a 2 ans ames = [name.replace(' ', '_') for name in names]
print (names)
namesfr = [
'Largeur des épaules',
...
]
dict_names_fr = dict(zip(names, namesfr))
print (dict_names_fr)
file_url = "http://linus.umons.ac... iter=' | ', engine='python', index_col=False)
#
print (df)
# pandas misc
# https://stackoverflow.com/qu... ing-with-complex-criteria-from-pandas-dataframe
#
print (df.columns)
print (df.Age)
print (df.dtypes)
print ( suite_de_fibonacci @teaching:progappchim 12 Occurrences trouvées, Dernière modification : il y a 8 ans ez...
<code python fibonacci01-mauvais.py>
a = 0
print (a)
b = 1
print (b)
c = a + b
print (c)
d = b + c
print (d)
e = c + d
print (e)
f = d + e
print (f)
g = e + f
print (g)
h = f + g
print (h)
i = g suite_de_fibonacci-2 @teaching:progappchim 12 Occurrences trouvées, Dernière modification : il y a 8 ans de_Fibonacci
"""
# élément d'indice 0
i = 0
a = 0
print (i,a)
# élément d'indice 1
i = 1
b = 1
print (i,b)
# structure de répétition pour appliquer la règle de r... oursuivre avec les mêmes instructions
???
print (i,c) #quelque chose de ce genre
</code>
Un peu ... de_Fibonacci
"""
# élément d'indice 0
i = 0
a = 0
print (i,a)
# élément d'indice 1
i = 1
b = 1
print (i,b)
tkinter_gui_simple @teaching:progappchim 12 Occurrences trouvées, Dernière modification : il y a 2 ans desinformations 10 Occurrences trouvées, Dernière modification : il y a 19 mois suite_de_fibonacci-4 @teaching:progappchim 10 Occurrences trouvées, Dernière modification : il y a 8 ans scipy_simple @teaching:progappchim 9 Occurrences trouvées, Dernière modification : il y a 6 ans exos_empreinte_carbone 8 Occurrences trouvées, Dernière modification : il y a 5 ans poker_menteur @teaching:exos 8 Occurrences trouvées, Dernière modification : il y a 12 ans math_nombres @teaching:progappchim 8 Occurrences trouvées, Dernière modification : il y a 5 ans ph-3d @teaching:progappchim 8 Occurrences trouvées, Dernière modification : il y a 4 ans algos_entiers @teaching:progappchim 7 Occurrences trouvées, Dernière modification : il y a 2 ans factorielle-2 @teaching:progappchim 7 Occurrences trouvées, Dernière modification : il y a 8 ans sequences_brins_adn @teaching:exos 6 Occurrences trouvées, Dernière modification : il y a 6 ans matrices @teaching:progappchim 6 Occurrences trouvées, Dernière modification : il y a 7 ans openbabel_jmol @teaching:progappchim 6 Occurrences trouvées, Dernière modification : il y a 3 ans pieges @teaching:progappchim 6 Occurrences trouvées, Dernière modification : il y a 9 ans testjs @teaching:progappchim 6 Occurrences trouvées, Dernière modification : il y a 8 ans rotateur_biatomique @teaching:progappchim:matplotlib_gallery 6 Occurrences trouvées, Dernière modification : il y a 7 ans initinfo 5 Occurrences trouvées, Dernière modification : il y a 13 mois chempy @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 2 ans diffusion_chimique_1d @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 10 ans factorielle-3 @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 8 ans lennard-jones @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 10 ans polynomes-7 @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 6 ans ppoo @teaching:progappchim 5 Occurrences trouvées, Dernière modification : il y a 2 ans collection_namedtuple_exemple @teaching:progappchim 4 Occurrences trouvées, Dernière modification : il y a 4 ans notions_avancees @teaching:progappchim 4 Occurrences trouvées, Dernière modification : il y a 23 mois ph_courbe_titrage_2011 @teaching:progappchim 4 Occurrences trouvées, Dernière modification : il y a 4 ans polynomes-bonus @teaching:progappchim 4 Occurrences trouvées, Dernière modification : il y a 3 ans urllib @teaching:progappchim 4 Occurrences trouvées, Dernière modification : il y a 3 ans lancer_pieces @teaching:exos 3 Occurrences trouvées, Dernière modification : il y a 3 ans calcul_matriciel_2012 @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 11 ans csv @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 4 ans dictionary_adn_protein @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 12 ans fizz_buzz @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-6 @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-10 @teaching:progappchim 3 Occurrences trouvées, Dernière modification : il y a 8 ans informatique 2 Occurrences trouvées, Dernière modification : il y a 8 ans psychologie_de_l_education 2 Occurrences trouvées, Dernière modification : il y a 13 mois paradoxe_anniversaires @teaching:exos 2 Occurrences trouvées, Dernière modification : il y a 5 ans analyse_images @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 4 ans ensemble_mandelbrot_2013 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 10 ans fit_modele_einstein @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 10 ans glossaire_chimie @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 6 ans ph_acides_bases_2013 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 11 ans polynomes-2 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-3 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-4 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-11 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 8 ans representation_molecules_2013 @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 5 ans solubilite_ph_t @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 9 ans tris @teaching:progappchim 2 Occurrences trouvées, Dernière modification : il y a 2 ans cuisine_moleculaire 1 Occurrences trouvées, Dernière modification : il y a 2 ans exos_energie_d_ionisation 1 Occurrences trouvées, Dernière modification : il y a 6 ans protoxyde_azote 1 Occurrences trouvées, Dernière modification : il y a 3 ans publis_diverses 1 Occurrences trouvées, Dernière modification : il y a 14 mois rotation_vibration_molecules_biatomiques @teaching:exos 1 Occurrences trouvées, Dernière modification : il y a 3 ans codes_presentation @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 4 ans collection_counter_exemple @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 4 ans factorielle @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 8 ans game_of_life_conway-2012 @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 4 ans koch_snowflake @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 8 ans osm_interrogation @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 10 ans pavage_penrose_2013 @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 11 ans polynomes @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-5 @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 8 ans polynomes-7-contrib1 @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 13 ans pressions_partielles_systemes_non_ideaux @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 9 ans print_format @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 3 ans random_walk_2d-simple @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 4 ans tableau_periodique_2013 @teaching:progappchim 1 Occurrences trouvées, Dernière modification : il y a 5 ans potentiel_morse @teaching:progappchim:matplotlib_gallery 1 Occurrences trouvées, Dernière modification : il y a 5 ans