Aantekeningen Beginner Python bij Training Programmeren - Universiteit Utrecht 23/24

Hoorcollege 1

Let op, omdat het hier om programmeertaal gaat, kunnen deze aantekeningen ietswat onduidelijk zijn. Wanneer je je echter in Python en in de practicumopdrachten verdiept, zul je meer aan deze korte aantekeningen hebben.

Paar invoermogelijkheden:

  • Als je (12, 24, 2) doet, krijg je 12, 14, 16, enzovoort t/m 22.
  • arange is een functie
  • np.arange is dan de invoer
  • Een functie is ook print (bb)

Grafiek plotten:

  • plt.plot (aa,bb, ‘ro:’)
  • ro staat voor de kleur van de grafiek: rood
  • De dubbele punt staat voor puntjes voor de grafiek.

Functie maken:

  • def teltweegetallenop
  • def is de naam van de functie
  • Als teltweegetallenop dikgedrukt is geworden, dan ben je goed bezig.
  • return uitkomst
  • en dan # end of function
  • Zo moet je de code afsluiten

Betekenissen van invoer

  • Cntrl 1 is zien wat er achter de code ligt
  • sqrt is de wortel
  • een punt is in feite een komma
  • een komma is een scheidingsteken
  • print is een tekst printen

Let op bij de invoer:

  • (aa,bb) 
  • Dat is aa op de x-as en bb op de y-as
  • voor sqrt, moet je np zetten, anders krijg je een error
  • np.sqrt

Voorbeeld van practicumopdracht, naam grafiek:

  • maakhelemooiegrafiek2(aa, bb, ‘komkommer’ (titel van de grafiek), ‘pastinaak’ (x-as naam), ‘wortel’ (y-as naam), ‘groente’ (figuurnaam).

Plaatje invoeren

  • mijnplaat = np.random.rand(10,10)
  • Het plaatje is hier 10 bij 10
  • Dan krijg je een plaatje

 

Check summaries and supporting content in teasers:
Psychologie: Utrecht - Bachelor en Masters UU - Samenvattingen en studiehulp
Access: 
Public
Work for WorldSupporter

Image

JoHo can really use your help!  Check out the various student jobs here that match your studies, improve your competencies, strengthen your CV and contribute to a more tolerant world

Working for JoHo as a student in Leyden

Parttime werken voor JoHo

Image

Follow the author: Hugo
More contributions of WorldSupporter author: Hugo:
Comments, Compliments & Kudos:

Add new contribution

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Promotions
Image

Op zoek naar een uitdagende job die past bij je studie? Word studentmanager bij JoHo !

Werkzaamheden: o.a.

  • Het werven, aansturen en contact onderhouden met auteurs, studie-assistenten en het lokale studentennetwerk.
  • Het helpen bij samenstellen van de studiematerialen
  • PR & communicatie werkzaamheden

Interesse? Reageer of informeer

Check how to use summaries on WorldSupporter.org


Online access to all summaries, study notes en practice exams

Using and finding summaries, study notes en practice exams on JoHo WorldSupporter

There are several ways to navigate the large amount of summaries, study notes en practice exams on JoHo WorldSupporter.

  1. Use the menu above every page to go to one of the main starting pages
    • Starting pages: for some fields of study and some university curricula editors have created (start) magazines where customised selections of summaries are put together to smoothen navigation. When you have found a magazine of your likings, add that page to your favorites so you can easily go to that starting point directly from your profile during future visits. Below you will find some start magazines per field of study
  2. Use the topics and taxonomy terms
    • The topics and taxonomy of the study and working fields gives you insight in the amount of summaries that are tagged by authors on specific subjects. This type of navigation can help find summaries that you could have missed when just using the search tools. Tags are organised per field of study and per study institution. Note: not all content is tagged thoroughly, so when this approach doesn't give the results you were looking for, please check the search tool as back up
  3. Check or follow your (study) organizations:
    • by checking or using your study organizations you are likely to discover all relevant study materials.
    • this option is only available trough partner organizations
  4. Check or follow authors or other WorldSupporters
    • by following individual users, authors  you are likely to discover more relevant study materials.
  5. Use the Search tools
    • 'Quick & Easy'- not very elegant but the fastest way to find a specific summary of a book or study assistance with a specific course or subject.
    • The search tool is also available at the bottom of most pages

Do you want to share your summaries with JoHo WorldSupporter and its visitors?

Quicklinks to fields of study for summaries and study assistance

Field of study

Access level of this page
  • Public
  • WorldSupporters only
  • JoHo members
  • Private
Statistics
1048