Recent Changes - Search:

Oktatás

* Programozás 1
  + feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

Teaching

* Programming 1 (BI)
  ◇ exercises
  ◇ quick link

* Scripting Languages
  ◇ exercises
  ◇ quick link

teaching assets


Félévek

* aktuális (2023/24/2)
* archívum


Linkek

* kalendárium
   - munkaszüneti napok '20
* tételsorok
* jegyzetek
* szakdolgozat / PhD
* ösztöndíjak
* certificates
* C lang.
* C++
* C#
* Clojure
* D lang.
* Java
* Nim
* Scala


[ edit | logout ]
[ sandbox | passwd ]

20130218c

Character count

Write a function with the following signature: charcount(text). The function receives an English text and returns a dictionary that has 28 key/value pairs. The keys of the dictionary should be the following: lower case letters of the English alphabet ("a", "b", …, "z"), "whitespace", and "other". The value of a key must indicate the number of occurrances of the given character in the input string.

Example:

charcount("cat and dog")

will return:

{'whitespace': 2, 'others': 0, 'a': 2, 'b': 0, 'c': 1, ..., 't': 1, ..., 'z': 0}
Cloud City

  

Blogjaim, hobbi projektjeim

* The Ubuntu Incident
* Python Adventures
* @GitHub
* heroku
* extra
* haladó Python
* YouTube listák


Debrecen | la France


[ edit ]

Edit - History - Print *** Report - Recent Changes - Search
Page last modified on 2015 June 27, 12:30