What Was Your First Programming Language?
|
07-09-2015, 06:42 AM
Post: #92
|
|||
|
|||
RE: What Was Your First Programming Language?
(07-09-2015 01:55 AM)Sylvain Cote Wrote: Or then using the ternary operator ?: Code: print $guess > $number ? "Too high!" : "Too low!"; (07-09-2015 02:00 AM)Les Bell Wrote: Or then: Code: print("Too high! " if guess > number else "Too low! ") Cheers Thomas PS: In Python there's no need to put a semicolon at the end of each line. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)