Example. >>> rowkey('u') 1 >>> rowkey('a') 2 >>> rowkey('z') 3 >>> rowkey('?')

Vergelijkbare documenten
After that, the digits are written after each other: first the row numbers, followed by the column numbers.

Calculator spelling. Assignment

Genetic code. Assignment

The genesis of the game is unclear. Possibly, dominoes originates from China and the stones were brought here by Marco Polo, but this is uncertain.

Solar system. Assignment

Christmas party. Preparation. Assignment

Classification of triangles

z x 1 x 2 x 3 x 4 s 1 s 2 s 3 rij rij rij rij

Chromosomal crossover

Introductie in flowcharts

The colour of a pixel in a bit map picture can be presented in different ways. For this assignment, we distinguish two categories:

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 8 februari 2010

Daylight saving time. Assignment

(1) De hoofdfunctie van ons gezelschap is het aanbieden van onderwijs. (2) Ons gezelschap is er om kunsteducatie te verbeteren

SAMPLE 11 = + 11 = + + Exploring Combinations of Ten + + = = + + = + = = + = = 11. Step Up. Step Ahead

Add the standing fingers to get the tens and multiply the closed fingers to get the units.

My Inspiration I got my inspiration from a lamp that I already had made 2 years ago. The lamp is the you can see on the right.

Country recognition. Assignment

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

MyDHL+ Van Non-Corporate naar Corporate

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

Quality requirements concerning the packaging of oak lumber of Houthandel Wijers vof ( )

Engels op Niveau A2 Workshops Woordkennis 1

The first line of the input contains an integer $t \in \mathbb{n}$. This is followed by $t$ lines of text. This text consists of:

ALGORITMIEK: answers exercise class 7

L.Net s88sd16-n aansluitingen en programmering.

Demultiplexing reads FASTA format genome sequencing reads run

L.Net s88sd16-n aansluitingen en programmering.

Four-card problem. Input

Preschool Kindergarten

Example. >>> airmap = Map() >>> airmap.eruption(0, 0) >>> airmap.ashcloud {(0, 0)} >>> airmap.spread()

2019 SUNEXCHANGE USER GUIDE LAST UPDATED

Hidato. Assignment. A hidato (left) and its solution (right).

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 7 februari 2011

CTI SUITE TSP DETAILS

REIN kast. eiken standaard iepen. gebakken iepen. gerookt. licht iepen. bijzonderheden. staanders/achterwand/deur. ontwerp: Gjalt Pilat, 2005

Earth Similarity Index

The 15 puzzle invented by Noyes Chapman consisted of a $4 \times 4$ grid of which the field are numbered from 1 to 15.

DALISOFT. 33. Configuring DALI ballasts with the TDS20620V2 DALI Tool. Connect the TDS20620V2. Start DALISOFT

CHROMA STANDAARDREEKS

Settings for the C100BRS4 MAC Address Spoofing with cable Internet.

The mitochondrial genome has bases and codes for 37 genes: 13 polypeptides, 22 trnas and 2 ribosomal RNAs.

OUTDOOR HD BULLET IP CAMERA PRODUCT MANUAL

B1 Woordkennis: Spelling

Esther Lee-Varisco Matt Zhang

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education. Published

Luister alsjeblieft naar een opname als je de vragen beantwoordt of speel de stukken zelf!

General info on using shopping carts with Ingenico epayments

i(i + 1) = xy + y = x + 1, y(1) = 2.

It s all about the money Group work

Shipment Centre EU Quick Print Client handleiding [NL]

Group work to study a new subject.

ANGSTSTOORNISSEN EN HYPOCHONDRIE: DIAGNOSTIEK EN BEHANDELING (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

Lists of words from the books, and feedback from the sessions, are on

Interface tussen Stuurbediening en Sony autoaudio

Chess board distance $\max( x_0-x_1, y_0-y_1 )$

1a. We werken het geval voor het tandenpoetsen uit. De concepten zijn (we gebruiken Engelse termen en afkortingen):

AE1103 Statics. 25 January h h. Answer sheets. Last name and initials:

S e v e n P h o t o s f o r O A S E. K r i j n d e K o n i n g

Ontpopping. ORGACOM Thuis in het Museum

Tentamen Objectgeorienteerd Programmeren

3e Mirror meeting pren April :00 Session T, NVvA Symposium

Assignment. Example. is surrounded by exactly 3 coloured cells.

Hoe met Windows 8 te verbinden met NDI Remote Office (NDIRO) How to connect With Windows 8 to NDI Remote Office (NDIRO

Meetkunde en Lineaire Algebra

Buzzword bingo Buzzword bingo bul shit bingo

CUSTOMIZE YOUR APPLE AND PRESENT A UNIQUE COMPANY GIFT

Meetkunde en Lineaire Algebra

Firewall van de Speedtouch 789wl volledig uitschakelen?

Lijnenspel. Remco van Groesen ( ) & Ellen Houbiers ( )

liniled Cast Joint liniled Gietmof liniled Castjoint

Brei een Sinterklaas / Knit a Sinterklaas

AN URBAN PLAYGROUND AFSTUDEERPROJECT

Opgave 2 Geef een korte uitleg van elk van de volgende concepten: De Yield-to-Maturity of a coupon bond.

This appendix lists all the messages that the DRS may send to a registrant's administrative contact.

RECEPTEERKUNDE: PRODUCTZORG EN BEREIDING VAN GENEESMIDDELEN (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

Registratie- en activeringsproces voor de Factuurstatus Service NL 1 Registration and activation process for the Invoice Status Service EN 10

FRAME [UPRIGHT MODEL] / [DEPTH] / [HEIGHT] / [FINISH] TYPE OF BASEPLATE P Base plate BP80 / E alternatives: ZINC finish in all cases

Het is geen open boek tentamen. Wel mag gebruik gemaakt worden van een A4- tje met eigen aantekeningen.

!!!! Wild!Peacock!Omslagdoek!! Vertaling!door!Eerlijke!Wol.!! Het!garen!voor!dit!patroon!is!te!verkrijgen!op! Benodigdheden:!!

Screen Design. Deliverable 3 - Visual Design. Pepijn Gieles Docent: Jasper Schelling

Het Effect van Verschil in Sociale Invloed van Ouders en Vrienden op het Alcoholgebruik van Adolescenten.

Datamodelleren en databases 2011

Intermax backup exclusion files

THE WORK HET WERK HARALD BERKHOUT

should(n t) / should(n t) have to zouden moeten / hadden meestergijs.nl

BE Nanoregistry Annual Public Report

Pigpen cipher. Assignment

Bijlage 2: Informatie met betrekking tot goede praktijkvoorbeelden in Londen, het Verenigd Koninkrijk en Queensland

APPROACHING THE FAMILY

2006 Volkswagen Jetta TDI

TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde en Informatica. Tentamen Calculus B (2WBB1) op maandag 28 januari 2013, 14:00 17:00 uur

Cambridge International Examinations Cambridge International General Certificate of Secondary Education

Meetkunde en Lineaire Algebra

VOORSTEL TOT STATUTENWIJZIGING UNIQURE NV. Voorgesteld wordt om de artikelen 7.7.1, 8.6.1, en te wijzigen als volgt: Toelichting:

Large word squares are dramatically harder to make than small ones. To date, the largest anyone has managed to find are composed of 9-letter words:

COGNITIEVE DISSONANTIE EN ROKERS COGNITIVE DISSONANCE AND SMOKERS

Handleiding Installatie ADS

LDA Topic Modeling. Informa5ekunde als hulpwetenschap. 9 maart 2015

Transcriptie:

Keyboard The inventor of the typewriter Christopher Scholes put the letters on his first model in alphabetical order. Because the symbols that are often used stood next to each other, the mechanical letter staves of the typewriter often bumped against each other and got stuck. In order to prevent this, Scholes reorganized the symbols of the keyboard. The first Scholes and Glidden typewriter that was eventually taken into production around 87 at the company Remington already had a precursor of the current QWERTY-division. According to a popular myth, Remington placed the letters on the first row of the typewriter so that the sellers could make an impression on the customers by typing the product name TYPEWRITER using the symbols on the first row of the keyboard. It is also often said that TYPEWRITER is the longest word that can be typed with the letters of one single row of the keyboard. Remainders of the original alphabetical division of the keyboard can be found in the sequence DFGHJKL in the middle row of a keyboard. QWERTY- keyboard division from a patent of Christopher Sholes (U.S. Patent No. 07,559 from 878). Some keys are clearly the same as the modern QWERTY division: the C and the X changed places and the M is now next to the N. Apart from QWERTY other divisions were developed, such as the AZERTY keyboards that are used in France and in Belgium, QWERTZ keyboards that are used in German-speaking and some Eastern-European countries, or the Dvorak keyboard, that was invented by August Dvorak because it is supposed to be better from an ergonomic point of view. Assignment. Write a function rowkey which can be used to determine on which row of the keyboard a given symbol can be found This symbol must be given to the function as an argument. The function must use the standard division of a QWERTY keyboard, but through an optional argument keyboard, another division can be given to the function. A keyboard division is described by a string where the symbols of the keyboard are listed from left to right and from top to bottom. Between two rows of a keyboard a vertical line ( ) is placed in the string. The division of a QWERTY keyboard, for example, is given as QWERTYUIOP ASDFGHJKL ZXCVBNM and the division of an AZERTY keyboard as AZERTYUIOP QSDFGHJKLM WXCVBN. The first row is indicated with row number, and the function must print the value None if the given symbol isn't found on the keyboard. When searching, no distinction may be made between uppercase and lowercase letters.. Use the function rowkey to write a function rowword with two parameters: an obligatory parameter word to which a given word must be given as an argument, and an optional

parameter keyboard with the same meaning as in the function rowkey. If the given word can be typed entirely with the letters of one single row of the keyboard, the function must print the number of that row (rows are again numbered from ) as a result. Otherwise, the function should print the value None. Even if the word is an empty string, the value None must be printed. The function cannot make a distinction between uppercase and lowercase letters.. Use the function rowword to write a function longestword. To this function, a list of words must be given as an obligatory argument. From this word list, the function should print the longest word that can be typed using one row of the keyboard. If multiple words have an equal length, the function must print the first word that occurs in the word list. Next to a list of words, two optional parameters can be given to the function: an optional parameter keyboard with the same meaning as for the function rowkey, and an optional parameter row that specifically indicates the letters of which row of the keyboard the words can be formed with. If this last parameter isn't given, it doesn't matter which row the keyboard uses to write the words, as long as the words can be formed with the letters of one single keyboard row. Example >>> rowkey('u') >>> rowkey('a') >>> rowkey('z') >>> rowkey('?') >>> rowkey('a', keyboard=azerty) >>> rowword('tiruppur') >>> rowword('jalajala') >>> rowword('bavikove') >>> rowword(, keyboard=azerty) >>> rowword('bavikove', keyboard=azerty) >>> rowword(, keyboard=hcesar) >>> rowword('xiulin', keyboard=hcesar) >>> rowword('bvkv', keyboard=hcesar) >>> cities = [,,, 'Piripiri', 'Tuntum'] >>> longestword(cities) >>> longestword(cities, row=) 'Piripiri' >>> longestword(cities, row=)

>>> longestword(cities, row=) >>> longestword(cities, keyboard=azerty) >>> longestword(cities, keyboard=azerty, row=) >>> longestword(cities, row=, toetsenbord=azerty) >>> longestword(cities, keyboard=azerty, row=) >>> longestword(cities, keyboard=hcesar) >>> longestword(cities, keyboard=hcesar, row=) >>> longestword(cities, row=, keyboard=hcesar) 'Tuntum' >>> longestword(cities, keyboard=hcesar, row=) De uitvinder van de schrijfmachine Christopher Scholes zette op zijn eerste model de letters op het toetsenbord in alfabetische volgorde. Omdat enkele veelgebruikte symbolen hierdoor naast elkaar kwamen te liggen, botsten de mechanische letterstangetjes van de schrijfmachine vaak tegen elkaar en bleven ze klem zitten. Om dit te verhelpen, herschikte Scholes de symbolen op het toetsenbord. De eerste Scholes en Glidden schrijfmachine die uiteindelijk rond 87 in productie werd genomen bij het bedrijf Remington had reeds een voorloper van de hedendaagse QWERTY-indeling. Volgens een populaire mythe plaatste Remington de letters op de eerste rij van de schrijfmachine zodat verkopers de klanten konden imponeren door de productnaam TYPEWRITER uit te schrijven aan de hand van de symbolen op de eerste rij van het toetsenbord. Er wordt ook nog vaak beweerd dat TYPEWRITER het langste woord is dat kan geschreven worden met de letters van één enkele rij op een toetsenbord. Restanten van de oorspronkelijke alfabetische indeling van het toetsenbord zijn nog terug te vinden in de reeks DFGHJKL op de middelste rij van een toetsenbord. QWERTY-toetsenbordindeling uit een patent van Christopher Sholes (U.S. Patent No. 07,559 uit 878). Enkele toetsen zijn hier nog niet hetzelfde als bij de moderne QWERTY-indeling: de C en de X zijn omgewisseld en de M zit nu naast de N. Naast QWERTY werden ook nog enkele andere toetsenbordindelingen ontwikkeld, zoals AZERTYtoetsenborden gebruikt in Frankrijk en België, QWERTZ-toetsenborden gebruikt in Duitstalige en een aantal Oost-Europese landen, of het Dvorak toetsenbord, bedacht door August Dvorak omdat het ergonomisch beter zou zijn.

Opgave. Schrijf een functie rijtoets waarmee kan bepaald worden op welke rij van een toetsenbord een gegeven symbool kan teruggevonden worden. Dit symbool moet als argument aan de functie doorgegeven worden. De functie moet standaard de indeling van een QWERTYtoetsenbord gebruiken, maar via een optioneel argument toetsenbord kan aan de functie een andere indeling doorgegeven worden. Een toetsenbordindeling wordt omschreven door een string waarin de symbolen van het toetsenbord worden opgelijst van links naar rechts, en van boven naar onder. Tussen twee rijen van een toetsenbord wordt in de string telkens een verticale streep ( ) geplaatst. De indeling van een QWERTY-toetsenbord wordt bijvoorbeeld weergegeven als QWERTYUIOP ASDFGHJKL ZXCVBNM en de indeling van een AZERTY-toetsenbord als AZERTYUIOP QSDFGHJKLM WXCVBN. De eerste rij wordt aangegeven met rijnummer, en de functie moet de waarde None teruggeven indien het gegeven symbool niet op het toetsenbord wordt teruggevonden. Bij het opzoeken mag geen onderscheid gemaakt worden tussen hoofdletters en kleine letters.. Gebruik de functie rijtoets om een functie rijwoord te schrijven met twee parameters: een verplichte parameter woord waaraan een gegeven woord als argument moet doorgegeven worden, en een optionele parameter toetsenbord met dezelfde betekenis als bij de functie rijtoets. Indien het gegeven woord volledig kan uitgeschreven worden met de letters op één enkele rij van het toetsenbord, dan moet de functie het nummer van die rij (rijen worden opnieuw genummerd vanaf ) als resultaat teruggeven. Anders moet de functie de waarde None teruggeven. Ook als het woord de lege string is, moet de waarde None teruggegeven worden. De functie mag geen onderscheid maken tussen hoofdletters en kleine letters.. Gebruik de functie rijwoord om een functie langstewoord te schrijven. Aan deze functie moet een lijst van woorden als verplicht argument doorgegeven worden. Uit deze woordenlijst moet de functie het langste woord teruggeven dat kan geschreven worden met de letters op één enkele rij van het toetsenbord. Indien er meerdere zulke woorden zijn met maximale lengte, dan moet de functie het woord teruggeven dat als eerst voorkomt in de woordenlijst. Naast een lijst van woorden kunnen aan de functie nog twee optionele parameters doorgegeven worden: een optionele parameter toetsenbord met dezelfde betekenis als bij de functie rijtoets, en een optionele parameter rij die specifiek aangeeft met de letters van welke rij van het toetsenbord de woorden moeten kunnen gevormd worden. Indien deze laatste parameter niet wordt doorgegeven, dan maakt het niet uit welke rij van het toetsenbord gebruikt wordt om de woorden uit te schrijven, zolang de woorden maar kunnen gevormd worden met de letters van één enkele rij van het toetsenbord. Voorbeeld >>> rijtoets('u') >>> rijtoets('a') >>> rijtoets('z') >>> rijtoets('?') >>> rijtoets('a', toetsenbord=azerty) >>> rijwoord('tiruppur')

>>> rijwoord('jalajala') >>> rijwoord('bavikove') >>> rijwoord(, toetsenbord=azerty) >>> rijwoord('bavikove', toetsenbord=azerty) >>> rijwoord(, toetsenbord=hcesar) >>> rijwoord('xiulin', toetsenbord=hcesar) >>> rijwoord('bvkv', toetsenbord=hcesar) >>> steden = [,,, 'Piripiri', 'Tuntum'] >>> langstewoord(steden) >>> langstewoord(steden, rij=) 'Piripiri' >>> langstewoord(steden, rij=) >>> langstewoord(steden, rij=) >>> langstewoord(steden, toetsenbord=azerty) >>> langstewoord(steden, toetsenbord=azerty, rij=) >>> langstewoord(steden, rij=, toetsenbord=azerty) >>> langstewoord(steden, toetsenbord=azerty, rij=) >>> langstewoord(steden, toetsenbord=hcesar) >>> langstewoord(steden, toetsenbord=hcesar, rij=) >>> langstewoord(steden, rij=, toetsenbord=hcesar) 'Tuntum' >>> langstewoord(steden, toetsenbord=hcesar, rij=)