Class 24 — Friday March 20

Form with function

The task before us — Turn the abstract to concrete – Functions are at hand

Being functional — Is your mantra from now on — Embrace to your core


Look both ways


Link to town hall meetings


Agenda


Examples


To do


Slides


Slides as hosted by UVA



Module olio.py

Function voting_age()

x = olio.voting_age()

y = olio.voting_age()


Function has_blanks( s )

x = 'CS 1112'

y = 'the_aarvark_said_arf_arf'

b1 = olio.has_blanks( x )

b2 = olio.has_blanks( y )


Function great_seal()

olio.great_seal( )

print()

olio.great_seal( )

print()

produces as output

E Pluribus Unum

E Pluribus Unum


Function a_ing( n )

olio.a_ing( 5 )

print()

olio.a_ing( 1 )

print()

olio.a_ing( 3 )

produces as output

a

aa

aaa

aaaa

aaaaa

a

a

aa

aaa


What's next



GUI for photo manipulation homework screen grab


GUI for 15-square homework screen grab


colored continental USA map

 


 
  © 2020 Jim Cohoon   Resources from previous semesters are available.