english

learn php

learn css

learn html

learn javascript

learn php

6. loops

assignments
2 minutes / 217 words

six / assignments

assignment 6.1

this is an extension of assignment 5.3.

using the address book you already created and populated, output the whole book as a tab-separated table. you can choose any order you like for the names and fields, though i suggest alphabetical order and at least having the name as the first field displayed.

now that you have that working, clean the address book up...

  • ensure there's no leading or ending whitespace in any fields.
  • choose a capitalization scheme for names, nicknames, addresses and labels and apply it to all entries.
  • ensure all emails and pronouns are lowercase.
  • ensure emails contain no whitespace.

don't forget that some potentially have multiple entries.

make sure it displays properly as a table with the cleaned entries.

assignment 6.2

write a program that generates a list of a dozen random integers between one and a million then lists all the factors of each in ascending order.

assignment 6.3

write a program that turns a string of letters into morse code and the nato alphabet.

assignment 6.4

write a program that takes the current number of seconds on the clock and outputs a harmonic series up to that number in the denominator and the sum.

(a harmonic series is 1/1 + 1/2 + 1/3 + 1/4...)

don't forget to display a message saying it's impossible if the current number of seconds is 0.

learn php

learn css

learn html

learn javascript

powered by akelei. an avi sato project.