Recent Changes - Search:

Oktatás

* Programozás 2
  + feladatsor
  + C feladatsor
  + Python feladatsor
  + GitHub oldal

* Szkriptnyelvek
  + feladatsor
  + quick link

* levelezősök
  + Adator. prog.
  + feladatsor
  + quick link

teaching assets


Félévek

* 2024/25/1
* 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 ]

20130305a

XOR

The bool() built-in function decides about its parameter whether it's true (True) or false (False).

Exercise

Given two variables, decide if it holds that one of them is evaluated as True, while the other is evaluated as False. Actually, this is an XOR operation (eXclusive OR), but this time it's not about bit operations.

Example:

str1 = "python"
str2 = None

Here it is true that one of them (str1) is evaluated to be True, while the other variable (str2) is evaluated to be False.

Tip: don't be afraid to use the bool() function.

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 25, 10:24