Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #104158
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: Phyton |
| Date | 2016-03-06 17:05 +0000 |
| Message-ID | <mailman.256.1457284208.20602.python-list@python.org> (permalink) |
| References | <mailman.245.1457273767.20602.python-list@python.org> <ab5e40ce-e6d7-4c0a-8531-314fd7a695ff@googlegroups.com> |
On 06/03/2016 15:28, marco.nawijn@colosso.nl wrote: > 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 > Why in the year 2016 are people still giving links to the Luddite Python 2 docs? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Phyton "Diego ..." <diegopinder@hotmail.com> - 2016-03-05 15:41 +0000
Re: Phyton marco.nawijn@colosso.nl - 2016-03-06 07:28 -0800
Re: Phyton BartC <bc@freeuk.com> - 2016-03-06 15:33 +0000
Re: Phyton Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-06 17:05 +0000
Re: Phyton Steven D'Aprano <steve@pearwood.info> - 2016-03-07 10:14 +1100
Re: Phyton Larry Martell <larry.martell@gmail.com> - 2016-03-06 18:19 -0500
Re: Phyton Chris Angelico <rosuav@gmail.com> - 2016-03-07 10:28 +1100
Re: Phyton marco.nawijn@colosso.nl - 2016-03-06 22:45 -0800
Re: Phyton Chris Angelico <rosuav@gmail.com> - 2016-03-07 18:57 +1100
Re: Phyton Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-06 10:20 -0700
Re: Phyton Mark Lawrence <breamoreboy@yahoo.co.uk> - 2016-03-06 19:30 +0000
csiph-web