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 ]

ASCII codes

#############################

Python Scala
>>> ord('a')
97

>>> chr(97)
'a'
scala> 'a'.toInt
res3: Int = 97

scala> 97.toChar
res4: Char = a

Print the English alphabet in lowercase. Separate the letters with a space:

scala> for (i <- 'a'.toInt to 'z'.toInt) print(i.toChar + " ")
a b c d e f g h i j k l m n o p q r s t u v w x y z

Or, even simpler:

scala> for (c <- 'a' to 'z') print(c + " ")
a b c d e f g h i j k l m n o p q r s t u v w x y z
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 March 15, 22:31