Institute of Computer Science
  1. Main page
  2. Teeme ise arvutimänge
ET
Log in

Teeme ise arvutimänge

  • Esileht
  • I RAAMAT
    • Eessõna
    • Hakkame pihta!
      • Esimesed katsetused
      • Esimene päris programm
      • Esimene mäng
    • Olulised mõisted
      • Muutujad
      • Arvud ja sõned
    • Veateated
    • Matemaatika
      • Põhitehted
      • Suurendamine ja vähendamine
      • Eriti suured ja eriti väiksed arvud
      • Moodul math
    • Andmetüübid
    • Sisend ja väljund
      • "print" käsk, end="", koma ja +
      • Sisendi küsimine failist või veebist
    • Esimene graafika
    • Mida õppisid?
  • II RAAMAT
  • III RAAMAT
  • IV RAAMAT
  • V RAAMAT
  • VI RAAMAT

Olulised mõisted ja sissejuhatus

Matemaatika

Suurendamine ja vähendamine

Programmeerimises on olemas veel kaks põnevat tehet, selliseid tehteid sa tavaliselt koolitunnis ei kohta: nendeks teheteks on ühe võrra suurendamine ja ühe võrra vähendamine. Kuidas see käib?

Olgu mul näiteks muutuja number = 7. Ku ma tahan selle muutuja väärtust ühe võrra vähendada, siis ma kirjutan lihtsalt number -= 1.

Või kui ma tahan seda ühe võrra suurendada, siis kirjutan number += 1.

Vaata ka videot:

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment