We prove, using a theorem of W. Schmidt, that if the sequence of partial quotients of the continued fraction expansion of a positive irrational real number takes only two values, and begins with arbitrary long blocks which are "almost squares," then this number is either quadratic or transcendental. This result applies in particular to real numbers whose partial quotients form a Sturmian (or quasi-Sturmian) sequence, or are given by the sequence ( 1 +([n alpha] mod 2))(n much greater than0), or are a "repetitive" fixed point of a binary morphism satisfying some technical conditions. (C) 2001 Academic Press.