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 ]

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 this time.

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 2023 October 04, 15:45