Bok: Python
for realfag – 3. utgave
Av Finn Aakre Haugen og Marius Lysaker
ISBN
978-82-450-4605-2
I salg fra august 2023.
Kan kjøpes på nett, f.eks. hos
Fagbokforlaget, Akademika, Adlibris, Haugen bok, Norli, Ark eller
hos lokale bokhandlere.
Bokens
innholdsfortegnelse
Forord
Feilliste
Filer angitt med lenker i
boken
Her
(nedenfor) finner du filer som angitt med lenker i boken.
Du
kan søke etter en fil i nettleservinduet med
tastekombinasjonen ctrl+f.
Filene
er tilgjengelige kun enkeltvis (ikke samlet i zip-fil).
Kap.
1 Innledning
·
Ingen filer.
Kap.
2 Programmeringsmiljøer
·
Program 2.1: Fra_C_til_F_ver01.py
·
Program
2.2: numpy_sqrt.py
·
Program 2.3: Fra_F_til_C.py
·
Program
2.4: prog_time_sleep.py
Kap.
3 Variabler og datatyper
·
Program
3.1: print_format.py
·
Program
3.2: prog_renter.py
·
Program
3.3: prog_ceil_floor.py
·
Program
3.4: prog_avstand.py
·
Program
3.5: prog_avstand_input.py
·
Program
3.6: prog_kule.py
·
Program
3.7: prog_trekant.py
·
Program
3.8: prog_trekant_vinkler.py
·
Program
3.9: prog_tuppel.py
·
Program
3.10: pannekaker.py
·
Program
3.11: prog_oppg_liste.py
·
Program
3.12: prog_oppg_tekststreng.py
·
Program 3.13: prog_lister_navn_nr.py
·
Program 3.14:
prog_fra_tekst_til_liste.py
·
Program 3.15: prog_reiselengde.py
·
Program 3.16: prog_romreiselengde.py
·
Program
3.17: prog_losn_2grad.py
·
Program
3.18: prog_liste_array.py
·
Program
3.19: prog_array_liste.py
·
Program
3.20: prog_lage_arrayer.py
·
Program
3.21: prog_array_lengde.py
·
Program
3.22: prog_aksessering_array.py
·
Program
3.23: prog_utvidelse_array.py
·
Program
3.24: prog_maksverdi_array.py
·
Program
3.25: prog_array_match.py
·
Program 3.26:
prog_addere_til_array.py
·
Program 3.27:
prog_vektorisert_beregning.py
Kap.
4 Plotting
·
Program 4.1: temp_skien_enkel.py
·
Program
4.2: prog_temp_skien.py
·
Program
4.3: prog_subplot.py
·
Program
4.4: prog_plott_latex.py
·
Program
4.5: prog_stolpediagram.py
·
Program
4.6: prog_kakediagram.py
·
Program
4.7: prog_histogram.py
·
Program
4.8: temp_skien_oo_plotting.py
·
Program 4.9:
prog_plott_flere_kurver.py
·
Program
4.10: prog_subplott.py
·
Program
4.11: losn_stolpediagram.py
·
Program
4.12: losn_liggende_stolpediag.py
·
Program
4.13: losn_kakediag.py
·
Program 4.14:
oppg_temp_skien_oo_plotting.py
Kap.
5 Funksjoner
·
Program
5.1: prog_fun_intro.py
·
Program 5.2: prog_fun_tuppel_retur.py
·
Program 5.3: prog_fun_default_arg.py
·
Program
5.4: prog_fun_keyword_arg.py
·
Program
5.5: prog_fun_args.py
·
Program 5.6:
fun_intro_med_doktekst.py
·
Program 5.7:
fun_intro_med_multiple_doktekst.py
·
Program
5.8: fun_namespace.py
·
Program
5.9: prog_modul.py
·
Program
5.10: min_modul.py
·
Program
5.11: prog_lambda.py
·
Program
5.12: prog_fun_hemmelig.py
·
Program
5.13: prog_fun_myfun1.py
·
Program
5.14: prog_fun_myfun2.py
·
Program
5.15: prog_fun_rektangel.py
·
Program
5.16: prog_fun_valutakurs.py
·
Program
5.17: prog_fun_katet.py
·
Program
5.18: prog_fun_kinetisk.py
·
Program
5.19: prog_fun_potensiell.py
·
Program
5.20: prog_fun_standard_arg.py
·
Program
5.21: prog_fun_plot.py
·
Program
5.22: prog_fun_plot_funfun.py
·
Program
5.23: prog_fun_array.py
·
Program
5.24: prog_fun_fart.py
·
Program
5.25: prog_fun_areal_under_kurve.py
·
Program
5.26: prog_fun_omkrets.py
·
Program
5.27: hoved_prog.py
·
Program
5.28: rektangel_modul.py
·
Program
5.29: prog_oppg_lambda.py
Kap.
6 Testing av egen kode
·
Program 6.1: prog_losn_2grads_likn.py
·
Program
6.2: bmi.py
·
Program
6.3: elev1.py
·
Program
6.4: elev2.py
Kap.
7 If-else
·
Program
7.1: prog_if_else.py
·
Program
7.2: prog_if.py
·
Program
7.3: prog_elif.py
·
Program
7.4: prog_h2o.py
·
Program
7.5: prog_personnummer.py
·
Program
7.6: prog_koordinat.py
·
Program
7.7: prog_bot.py
·
Program
7.8: prog_ampm.py
·
Program
7.9: prog_mer_ampm.py
·
Program
7.10: losn_if_else.py
Kap.
8 Løkker
·
Program 8.1: prog_for_lokke_les.py
·
Program 8.2: prog_for_lokke_skriv.py
·
Program
8.3: nested_loops.py
·
Program 8.4:
prog_tid_preallokering_array.py
·
Program
8.5: while_intro.py
·
Program
8.6: losn_for_framover.py
·
Program
8.7: losn_for_bakover.py
·
Program 8.8:
prog_enkel_forloekke.py
·
Program
8.9: losn_for_24.py
·
Program
8.10: losn_for2array.py
·
Program
8.11: losn_for_linspace.py
·
Program
8.12: losn_my_linspace.py
·
Program
8.13: prog_for_loop.py
·
Program
8.14: prog_vectorized_y.py
·
Program
8.15: prog_min_y.py
·
Program 8.16:
prog_hvetekorn_sjakk.py
·
Program
8.17: prog_akilles.py
·
Program
8.18: prog_akilles_plott.py
·
Program
8.19: losn_dobbelfor_a.py
·
Program
8.20: losn_dobbelfor_b.py
·
Program
8.21: prog_enkel_whileloekke.py
·
Program
8.22: losn_while_sum.py
·
Program
8.23: losn_while_halvering.py
·
Program
8.24: losn_while_dobling.py
·
Program
8.25: losn_while_likning.py
·
Program
8.26: losn_while_trans_likn.py
·
Program
8.27: losn_while_indeks.py
·
Program
8.28: losn_while_forover.py
·
Program
8.29: losn_while_bakover.py
·
Program
8.30: prog_while_min.py
·
Program
8.31: prog_preallok.py
Kap.
9 Lese og skrive fildata
·
Program
9.1: prog_loadtxt.py
·
Program
9.2: prog_savetxt.py
·
Program
9.3: prog_excel_lese.py
·
Program
9.4: prog_excel_skrive.py
·
Program
9.5: kanonkule.py
·
Program
9.6: prog_lotto.py
·
Program
9.7: prog_klima1.py
·
Program
9.8: prog_klima3.py
·
Program
9.9: prog_temperatur_savetxt.py
·
Program
9.10: prog_temperatur_loadtxt.py
·
Program
9.11: prog_dyrebestand.py
·
Program
9.12: prog_solhoyde_1.py
·
Program
9.13: prog_solhoyde_2.py
·
Program
9.14: prog_frittfall.py
·
Program
9.15: kanonkule_losning.py
·
Program
9.16: prog_excel.py
Kap.
10 Databehandling med Pandas
·
Program
10.1: prog_pandas_create_series_dataframe.py
·
Program
10.2: prog_create_series_dataframe.py
·
Program
10.3: prog_dictionary_dataframe.py
·
Program
10.4: prog_textual_index_dataframe.py
·
Program
10.5: prog_datamanip_dataframe.py
·
Program
10.6: prog_dataanalysis_dataframe.py
·
Program
10.7: prog_plot_dataframe.py
·
Program
10.8: prog_math_on_dataframe.py
·
Program 10.9:
prog_pandas_plukk_kol.py
·
Program
10.10: prog_pandas_sorter.py
·
Program
10.11: prog_pandas_manip_kol.py
·
Program 10.12:
prog_pandas_unike_verdier.py
·
Program
10.13: prog_pandas_datoer.py
·
Program
10.14: losn_temp_excel.py
·
Program
10.15: losn_folk_pandas.py
Kap.
11 Symbolske beregninger med Sympy
·
Program
11.1: prog_sympy_lynkurs.py
·
Program
11.2: prog_sympy_subs.py
·
Program
11.3: prog_sympy_lambdify.py
·
Program
11.4: prog_sympy_solve_nonlin.py
·
Program
11.5: prog_sympy_solve_2_unknowns.py
·
Program
11.6: prog_sympy_solve_diff_eq.py
·
Program
11.7: prog_sympy_manip.py
·
Program
11.8: prog_sympy_derivative.py
·
Program
11.9: prog_sympy_integration.py
·
Program
11.10: prog_sympy_matrices.py
·
Program
11.11: prog_sympy_jacobian.py
·
Program
11.12: prog_sym_solve_eq.py
·
Program
11.13: prog_oppg_lambdify.py
·
Program
11.14: prog_sym_diff.py
·
Program
11.15: prog_sym_bunnpunkt.py
·
Program
11.16: prog_sym_limit.py
Kap.
12 Objektorientert programmering
·
Program
12.1: prog_with_class_Formula_1.py
·
Program
12.2: module_def_Formula_1.py
·
Program
12.3: prog_using_imported_class_Formula_1.py
·
Program
12.4: prog_using_inherited_class_formula.py
·
Program
12.5: losning_temp_conv.py
·
Program
12.6: module_def_class_temp_conv.py
·
Program
12.7: main_prog_temp_conv.py
·
Program
12.8: losn_inherited_class.py
Kap.
13 Blanda drops (oppgavesamling)
·
Oppgave
13.4: bilnr.txt
·
Program
13.1: oppg_regnr.py
·
Oppgave
13.5: strom.txt
·
Oppgave 13.6: ra_data.txt
·
Program
13.2: prog_ra.py
·
Oppgave 13.12:
stein_saks_papir1.py
·
Oppgave 13.12:
stein_saks_papir2.py
·
Oppgave 13.12:
stein_saks_papir3.py
·
Program
13.3: exam_results.py
·
Oppgave 13.19: bondesjakk.py
·
Program
13.4: losn_panteautomat_a.py
·
Program
13.5: losn_panteautomat_b.py
·
Program
13.6: losn_array_a.py
·
Program
13.7: losn_array_b.py
·
Program 13.8:
losn_array_c_med_lokke.py
·
Program 13.9:
losn_array_c_uten_lokke.py
·
Program
13.10: losn_bremselengde_a.py
·
Program
13.11: losn_bremselengde_b.py
·
Program
13.12: losn_bremselengde_c.py
·
Program
13.13: losn_regnr_a.py
·
Program
13.14: losn_regnr_b.py
·
Program
13.15: losn_regnr_c.py
·
Program
13.16: losn_regnr_d.py
·
Program
13.17: losn_regnr_e.py
·
Program
13.18: losn_strom_a.py
·
Program
13.19: losn_strom_b.py
·
Program
13.20: prog_ra_1.py
·
Program
13.21: prog_ra_3.py
·
Program
13.22: prog_ra_2.py
·
Program
13.23: losn_sortering.py
·
Program
13.24: losn_iternum.py
·
Program
13.25: losn_mastermind.py
·
Program
13.26: losn_trapes_a.py
·
Program
13.27: losn_trapes_b.py
·
Program
13.28: losn_sum_a.py
·
Program
13.29: losn_sum_b.py
·
Program
13.30: losn_trekant.py
·
Program
13.31: losn_avst.py
·
Program
13.32: losn_terning_a.py
·
Program
13.33: losn_terning_b.py
·
Program 13.34: karakterberegning.py
·
Program
13.35: losn_bondesjakk.py
·
Program
13.36: losn_minesveiper_a_d.py
·
Program
13.37: losn_minesveiper_e.py
·
Program
13.38: losn_minesveiper_f.py
Kap.
14 Numerisk derivasjon og integrasjon
·
Program
14.1: prog_forward_diff.py
·
Program
14.2: prog_forward_integration_with_plot.py
·
Program
14.3: prog_trapezoid_integration_with_plot.py
·
Oppgave 14.8:
hastighetsdata.txt
·
Løsning 14.1:
prog_der_int_foroverdiff.py
·
Løsning 14.2:
prog_der_int_senterdifferanse.py
·
Løsning 14.3:
prog_der_int_bunnpunkt.py
·
Løsning 14.4:
prog_der_int_dobbelderiv.py
·
Løsning 14.5:
prog_oppgave_forover_int.py
·
Løsning 14.6:
prog_oppgave_bakover_int.py
·
Løsning 14.7:
prog_der_int_trapesint.py
·
Løsning 14.8:
prog_der_int_strekning.py
·
Løsning 14.9b:
prog_der_int_kurvelengde.py
·
Løsning 14.10:
prog_oppg_volum_integral.py
·
Løsning 14.11:
prog_oppg_integral_areal.py
Kap.
15 Løsing av likninger
·
Program
15.1: prog_plot_second_order_eq.py
·
Program 15.2:
likn_losn_brute_force.py
·
Program
15.3: prog_eq_solving_newton.py
·
Program
15.4: losn_bf_likn.py
·
Program
15.5: losn_likn_bf_plott.py
Kap.
16 Simulering av dynamiske systemer
·
Program
16.1: prog_sim_kettle.py
·
Program 16.2: prog_sim_vann_tank.py
·
Program
16.3: prog_sim_mfd.py
·
Program
16.4: prog_sim_tidsforsinkelse.py
·
Program
16.5: prog_realtime_sim_kettle.py
·
Program
16.6: prog_contin_read_params_from_file.py
Kap.
17 Optimering
·
Program
17.1: prog_plot_optim_square.py
·
Program
17.2: prog_optim_grid_square.py
·
Program 17.3:
prog_optim_x1_x2_grid_uten_ulikhetsbegr.py
·
Program
17.4: prog_linoptim_fuglekasser.py
·
Program
17.5: prog_optim_test.py
·
Program
17.6: prog_linoptim_sofaer.py
Kap.
18 Modelltilpassing til data
·
Eksempel 18.1: temp_jord.py
·
Program
18.1: model_adapt_temp_bf.py
·
Program
18.2: model_adapt_temp_norm_bf.py
·
Program
18.3: model_adapt_temp_scipy_bf.py
·
Program 18.4:
prog_grid_motor_K_T_estim_sim.py
·
Oppgave
18.4: data_dc_motor.txt
·
Løsning 18.2a:
prog_plott_kpi_2000_2009.py
·
Løsning 18.2b:
prog_kpi_param_estim_grid.py
·
Løsning
18.2b: prog_kpi_param_estim_least_squares_exact.py
·
Løsning
18.2d: prog_kpi_2010_2019.py
·
Løsning 18.3:
prog_grid_motor_K_T_L_estim_sim.py
·
Løsning 18.4:
prog_grid_motor_K_T_L_estim_real.py
Kap.
19 Statistikk og sannsynlighetsregning
·
Program
19.1: prog_dice.py
·
Program
19.2: prog_balls.py
·
Program
19.3: prog_random_seed.py
·
Program
19.4: prog_dice_mean_var_std.py
·
Program
19.5: prog_plot_distr_dice_histogram.py
·
Program
19.6: prog_plot_sim_normal_dist.py
·
Program
19.7: prog_plot_sim_uniform.py
·
Program
19.8: prog_prob_event_dice_choice.py
·
Program
19.9: prog_prob_number_of_boys.py
Kapitler i 2. utgave som
ikke inngår i 3. utgave
·
Kap.
19 Signalfiltrering
·
Kap.
20 Automatisk regulering
·
Kap.
21 Programmering av praktisk utstyr
Oppdatert 9. august 2023 av
Finn Aakre Haugen
|