#factor_html:factor:voorvoegsel:symbool
!if $taal=nl
    nivo_title=Rekenen met machtvoorvoegsels <br>\
    <em>je mag alle schrijfwijzen gebruiken <br>\
    (dus normaal of wetenschappelijk)<br>\
    maar uiteraard niet afronden...</em> 
!else
    nivo_title=Working with prefixes <br>\
    <em>you're allowed to use all notations<br>\
    (so normal and  scientific)<br>\
    but no rounding off, naturally...</em>
!endif
keuze=!randitem 1,2,3

!if $keuze=1
    factoren=!randitem 10<sup>18</sup>:10^18:exa:E,\
    10<sup>15</sup>:10^15:peta:P,\
    10<sup>12</sup>:10^12:tera:T,\
    10<sup>9</sup>:10^9:giga:G,\
    10<sup>6</sup>:10^6:mega:M,\
    10<sup>3</sup>:10^3:kilo:k,\
    10<sup>2</sup>:10^2:hecta:h,\
    10<sup>1</sup>:10^1:deca:da,\
    10<sup>-1</sup>:10^-1:deci:d,\
    10<sup>-2</sup>:10^-2:centi:c,\
    10<sup>-3</sup>:10^-3:milli:m,\
    10<sup>-6</sup>:10^-6:micro:&mu;,\
    10<sup>-9</sup>:10^-9:nano:n,\
    10<sup>-12</sup>:10^-12:pico:p,\
    10<sup>-15</sup>:10^-15:femto:f,\
    10<sup>-18</sup>:10^-18:atto:a   

    F=!replace internal : by , in $factoren
    !if $taal=nl
	eenheid=!randitem Gram:gewicht(massa),Newton:kracht,Liter:inhoud,Meter:lengte,Volt:spanning,\
	Coulomb:electrischelading,Electronvolt:lading,Henry:electische-inductie,Amp&eacute;re:stroomsterkte\
	Lumen:lichtstroom,Lux:verlichtingssterkte,Ohm:weerstand,Siemens:electrische-geleidbaarheid,\
	Watt:vermogen,Joule:arbeid(energie),Bequerell:radioactiviteit(stralingsintensiteit),\
	Seconden:tijd,Mol:hoeveelheid chemischestof,Bar:druk,Pascal:druk,Kelvin:temperatuur,Herz:frequentie	
    !else
	eenheid=!randitem Gramme:weight(masse),Newton:power,Litre:volume,Metre:length,Volt:voltage,\
	Coulomb:electric-charge,Electronvolt:charge,Henry:electric-induction,Amp&eacute;re:electric-current\
	Lumen:light-current,Lux:illumination-strength,Ohm:resistance,Siemens:conductivity,\
	Watt:power,Joule:energy,Bequerell:radioactivity,\
	Seconden:time,Mol:amount of schemical substance,Bar:pressure,Pascal:pressure,Kelvin:temperature,Herz:frequenty
    !endif
    eenheid=!replace internal : by , in $eenheid
    eenheid1=!item 1 of $eenheid
    omschrijving=!item 2 of $eenheid
    A=!randint 2,33
    F1=!item 1 of $F
    F2=!item 2 of $F
    F3=!item 3 of $F
    F4=!item 4 of $F
    GOED$n=$[$A*$F2]
    anders=!nospace  <b>$F4</b> $eenheid1
    !if $taal=nl 
	somtekst$n=Schrijf in de wetenschappelijk notatie:<br>\
	<em>$A $F3 $eenheid1</em> naar $eenheid1 <br><em>of anders gezegd: $A $anders ($omschrijving) naar $eenheid1</em>
	
	antwoord$n=$(somtekst$n) <br><font color="darkgreen">Volgens de tabel op de Help-pagina staat het voorvoegsel  $F3  voor  $F1  <br>\
	en het antwoord is dus dus:   $A&times;$F1 $eenheid1  </font>
    !else
	somtekst$n=Rewrite in scientific notation:<br>\
	<em>$A $F3 $eenheid1</em> to $eenheid1<br>\
	<em>or put differently:rewrite  $A $anders ($omschrijving) to $eenheid1</em>
	
	antwoord$n=$(somtekst$n) <br><font color="darkgreen">According to the table of the help-page is prefix $F3 equal to $F1<br>\
	and thus the correct answer is: $A&times;$F1 $eenheid1 </font>
    !endif    
    
 !exit
!endif
!if $keuze=2
    factoren=!randitem 10<sup>18</sup>:10^18:exa:E:10^-12,\
    10<sup>15</sup>:10^15:peta:PB:10^-9,\
    10<sup>12</sup>:10^12:tera:TB:10^-6,\
    10<sup>9</sup>:10^9:giga:GB:10^-3,\
    10<sup>6</sup>:10^6:mega:MB:1,\
    10<sup>3</sup>:10^3:kilo:kB:10^3
    F=!replace internal : by , in $factoren
    F1=!item 1 of $F
    F2=!item 2 of $F
    F3=!item 3 of $F
    F4=!item 4 of $F
    F5=!item 5 of $F
    opslag=!randitem floppies:1.44,floppies:2.88,datatapes:1024,datatapes:2048,cdrom's:650,cdrom's:700,DVD's:4300,DVD's:3700,memorycards:32,memorycards:16,memorycards:8,memorycards:4,usb-memorysticks:1024,usb-sticks:64,usb-sticks:128,usb-sticks:256,usb-sticks:512
    opslag=!replace internal : by , in $opslag
    floppy=!item 1 of $opslag
    MB=!item 2 of $opslag
    G=!randitem 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
    !if $F2 =10^3
	G=$[$G*10^3]
    !endif
    GOED$n=$[$G*$F2*10^-6]
    A=$[$(GOED$n)*$MB*$F5]
    !if $taal=nl
	somtekst$n=Een harde schijf heeft een capaciteit van $A $F4  ($F3 bytes)\
	<br> En hoeveel $floppy van $MB MB (megabytes) passen daar danop?    
	antwoord$n=$(somtekst$n) <br>\
	<font color="darkgreen"> Dat is dus: $A $F4 <font size="+1">&divide;</font> $MB MB <br>\
	en dus $A &times; $F1 bytes <font size="+1">&divide;</font> $MB &times;10<sup>6</sup> bytes = $(GOED$n) stuks </font>
    !else
	somtekst$n=A computer harddisk has a memory capacity  of $A $F4  ($F3 bytes)\
	<br>How many $floppy of $MB MB (megabytes) would fit on this harddisk?    
	antwoord$n=$(somtekst$n) <br>\
	<font color="darkgreen"> that would be: $A $F4 <font size="+1">&divide;</font> $MB MB <br>\
	and thus $A &times; $F1 bytes <font size="+1">&divide;</font> $MB &times;10<sup>6</sup> bytes = $(GOED$n) $floppy </font>
    !endif
 !exit
!endif
!if $keuze=3
    TT=!randitem 1,2,3,4,5,6,7,8,9,10,11,12
    GOED$n=$[2^$TT]
    opslag=!randitem memorycard:32,memorycard:16,memorycard:8,memorycard:4,usb-stick:1024,usb-stick:64,usb-stick:128,usb-stick:256,usb-stick:512
    opslag=!replace internal : by , in $opslag
    floppy=!item 1 of $opslag
    MB=!item 2 of $opslag
    A=$[1000*$MB/$(GOED$n)]
    !if $taal=nl
	somtekst$n=Een $floppy heeft een capaciteit van $MB MB (megabytes) \
	<br> En hoeveel digitale foto's van $A kB (kilobytes) passen daar dan maximaal op?	
	
	antwoord$n=$(somtekst$n) <br><font color="darkgreen">\
	Het voorvoegsel mega staat voor 10<sup>6</sup><br>\
	Het voorvoegsel kilo staat voor 10<sup>3</sup><br>\
	Hoe vaak past $A kB nu in $MB MB ?<br>\
	$MB MB <font size="+1">&divide;</font> $A kB <br>\
	Dus $MB &times; 10<sup>6</sup> bytes <font size="+1">&divide;</font> $A &times;10<sup>3</sup> bytes = $(GOED$n) stuks
    !else
	somtekst$n=A $floppy has a memory capacity of $MB MB (megabytes) \
	<br>And what's the max amount of digital images of $A kB (kilobytes) that would fit on this $floppy ?	
	
	antwoord$n=$(somtekst$n) <br><font color="darkgreen">\
	The prefix <tt>mega</tt> stands for 10<sup>6</sup><br>\
	The prefix <tt>kilo</tt> stands for 10<sup>3</sup><br>\
	How many $A kB blocks will fit of a storage of $MB MB ?<br>\
	$MB MB <font size="+1">&divide;</font> $A kB <br>\
	So $MB &times; 10<sup>6</sup> bytes <font size="+1">&divide;</font> $A &times;10<sup>3</sup> bytes = $(GOED$n) 
    !endif
 !exit
!endif	

