X-Received: by 10.182.16.199 with SMTP id i7mr10565523obd.44.1457278120223; Sun, 06 Mar 2016 07:28:40 -0800 (PST) X-Received: by 10.50.87.40 with SMTP id u8mr139651igz.0.1457278120188; Sun, 06 Mar 2016 07:28:40 -0800 (PST) Path: csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.glorb.com!hb3no11882229igb.0!news-out.google.com!k1ni10523igd.0!nntp.google.com!ok5no6316389igc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Sun, 6 Mar 2016 07:28:39 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.215.213.97; posting-account=fZjLcQoAAADFZq6LLJ35eHlvRekWYO2i NNTP-Posting-Host: 94.215.213.97 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Phyton From: marco.nawijn@colosso.nl Injection-Date: Sun, 06 Mar 2016 15:28:40 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:104149 On Sunday, March 6, 2016 at 3:16:19 PM UTC+1, Diego ... wrote: > Hello! I have a question in an exercise that says : Write an expression to determine whether a person should or should not pay tax . Consider paying tax people whose salary is greater than R $ 1,200.00 > > I do not know how to mount the logical expression !!! > > It's like: > > salary = 1250 > tax = Not True > salary > 1200 or not tax ???? Hello Diego, You are looking for the "if" statement. See the link below for the corresponding documentation: https://docs.python.org/2/tutorial/controlflow.html Your example would become something like: salary = 1250. if salary > 1200: has_to_pay_tax = True else: has_to_pay_tax = False Marco