How many lines of code in Python would it take to create a Go-playing AI like
AlphaGo ? Estimates ?
--
https://mail.python.org/mailman/listinfo/python-list
On Tuesday, November 28, 2017 at 8:12:09 PM UTC+8, Frank Millman wrote:
> "Cai Gengyang" wrote in message
> news:a8335d2c-1fb9-4ba9-b752-418d19e57...@googlegroups.com...
> >
> > On Tuesday, November 28, 2017 at 4:18:04 PM UTC+8, Frank Millman wrote:
> >
On Tuesday, November 28, 2017 at 4:18:04 PM UTC+8, Frank Millman wrote:
> "Cai Gengyang" wrote in message
> news:c2dfc9c4-3e16-480c-aebf-553081775...@googlegroups.com...
>
> > Sure, so how would the code look like if I want the "if" statement to be
> >
On Tuesday, November 28, 2017 at 6:09:17 AM UTC+8, Ned Batchelder wrote:
> On 11/27/17 7:54 AM, Cai Gengyang wrote:
> > Input :
> >
> > count = 0
> >
> > if count < 5:
> >print "Hello, I am an if statement and count is", count
> >
&
Input :
count = 0
if count < 5:
print "Hello, I am an if statement and count is", count
while count < 10:
print "Hello, I am a while and count is", count
count += 1
Output :
Hello, I am an if statement and count is 0 Hello, I am a while and count is 0
Hello, I am a while and count is 1
Input :
count = 0
if count < 5:
print "Hello, I am an if statement and count is", count
while count < 10:
print "Hello, I am a while and count is", count
count += 1
Output :
Hello, I am an if statement and count is 0
Hello, I am a while and count is 0
Hello, I am a while and count is 1
Right ... I am going to continue learning Python then ...
On Thursday, October 19, 2017 at 3:39:44 AM UTC+8, Ian wrote:
> On Mon, Oct 16, 2017 at 10:42 PM, Cai Gengyang wrote:
> > https://duckduckgo.com/html/?q=%22Cai%20Gengyang%22%20python This
> > seems to be the only me
https://duckduckgo.com/html/?q=%22Cai%20Gengyang%22%20python This
seems to be the only method that works, using DuckDuckGo
On Tue, Oct 17, 2017 at 4:54 AM, Thomas Jollans wrote:
> On 16/10/17 22:04, Cai Gengyang wrote:
> > I cannot remember where I posted the question it wa
On Tuesday, October 17, 2017 at 4:05:16 AM UTC+8, Cai Gengyang wrote:
> I cannot remember where I posted the question it was a while ago ..
>
> On Mon, Oct 16, 2017 at 5:12 PM, Thomas Jollans wrote:
>
> > On 2017-10-16 11:01, Cai Gengyang wrote:
> > > Does a
I cannot remember where I posted the question it was a while ago ..
On Mon, Oct 16, 2017 at 5:12 PM, Thomas Jollans wrote:
> On 2017-10-16 11:01, Cai Gengyang wrote:
> > Does anyone here know a way I can search for and display all my old
> posts on Python ? Thanks a lot.
>
Does anyone here know a way I can search for and display all my old posts on
Python ? Thanks a lot.
Gengyang
--
https://mail.python.org/mailman/listinfo/python-list
Hello,
Does anyone know of a way to find all my old posts about Python ? Thanks a lot!
GengYang
--
https://mail.python.org/mailman/listinfo/python-list
On Wednesday, September 27, 2017 at 1:01:50 PM UTC+8, Cameron Simpson wrote:
> On 26Sep2017 20:55, Cai Gengyang wrote:
> >On Wednesday, September 27, 2017 at 6:45:00 AM UTC+8, Cameron Simpson wrote:
> >> On 26Sep2017 14:43, Cai Gengyang wrote:
> >> >C) Set boo
On Wednesday, September 27, 2017 at 6:45:00 AM UTC+8, Cameron Simpson wrote:
> On 26Sep2017 14:43, Cai Gengyang wrote:
> >Help check if my logic is correct in all 5 expressions
>
> Why not just run some code interactively? Unless this is entirely a thought
> exercise to veri
C+8, Chris Angelico wrote:
> On Wed, Sep 27, 2017 at 7:43 AM, Cai Gengyang wrote:
> > Help check if my logic is correct in all 5 expressions
> >
> >
> > A) Set bool_one equal to the result of
> > False and False
> >
> > Entire Expression : False and False
Help check if my logic is correct in all 5 expressions
A) Set bool_one equal to the result of
False and False
Entire Expression : False and False gives True because both are False
B) Set bool_two equal to the result of
-(-(-(-2))) == -2 and 4 >= 16 ** 0.5
-(-(-(-2))) is equal to 2, and 2 i
"""
Boolean Operators
True and True is True
True and False is False
False and True is False
False and False is False
True or True is True
True or False is True
False or True is True
False or False is False
Not True is False
Not False is True
"""
If I simply w
Input :
# Assign True or False as appropriate on the lines below!
# (20 - 10) > 15
bool_one = False# We did this one for you!
# (10 + 17) == 3**16
# Remember that ** can be read as 'to the power of'. 3**16 is about 43 million.
bool_two = False
# 1**2 <= -1
bool_three = False
# 40 * 4 >= -4
Hey guys, I'm testing this on CodeAcademy, but I cant get the program to output
a result even after pressing the run button. Just wanted to check if my logic
is correct. Thanks alot
# Assign True or False as appropriate on the lines below!
# (20 - 10) > 15
bool_one = False# We did this one
So, I’m on section (3. The Tip) …
Instructions
1.
Set the variable tip to decimal value of 15% on line 5.
This was my input:
You’re almost there! Assign the tip variable on line 5.
meal = 44.50
tax = 6.75 / 100
tip = 15.0
But, when I tried to run the program, I don’t get any output at all. Nada
rnings that some features may no be available.
>
> Have you tried importing pygame after you did that? That's what'll prove
> one way or another that it worked.
>
> Regards,
> Nate
>
> On Wed, Nov 23, 2016 at 10:48 PM, Cai Gengyang
> wrote:
>
>> Yea, us
to get Python working, but take a few
> minutes to understand what we're saying. See below for my reply to your
> message (and an example of posting below quoted text).
>
> On 11/24/2016 08:05 AM, Cai Gengyang wrote:
> > CaiGengYangs-MacBook-Pro:~ CaiGengYang$ python
> &
icense" for more information.
On Thursday, November 24, 2016 at 11:26:49 PM UTC+8, DFS wrote:
> On 11/24/2016 10:09 AM, Cai Gengyang wrote:
>
> > Hmm, so whats the solution ?
>
>
> One solution - not the solution - is:
>
> $ pip install pygame
> Collectin
I mean whats the solution to import pygame ? How to import pygame ?
On Thursday, November 24, 2016 at 11:22:07 PM UTC+8, alister wrote:
> On Thu, 24 Nov 2016 07:09:22 -0800, Cai Gengyang wrote:
>
> > Hmm, so whats the solution ?
> >
> >
> The solution is to bottom
pygame
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pygame
>>> "import pygame"
'import pygame'
>>>
On Thursday, November 24, 2016 at 10:58:41 PM UTC+8, Thomas Nyberg wrote:
> On 11/24/2016 09:00
Hmm, so whats the solution ?
On Thursday, November 24, 2016 at 11:07:05 PM UTC+8, alister wrote:
> On Thu, 24 Nov 2016 06:00:20 -0800, Cai Gengyang wrote:
>
> > CaiGengYangs-MacBook-Pro:~ CaiGengYang$ import pygame -bash: import:
> > command not found
> >
> >
&g
t;
> Have you tried importing pygame after you did that? That's what'll prove
> one way or another that it worked.
>
> Regards,
> Nate
>
> On Wed, Nov 23, 2016 at 10:48 PM, Cai Gengyang
> wrote:
>
> > Yea, using Mac
> >
> > Following the
==> make
/usr/local/share/python/easy_install mecurial
brew install sdl
brew install sdl_mixer
brew install sdl_ttf
brew install sdl_image
hg clone https://bitbucket.org/pygame/pygame
cd pygame
/usr/local/bin/python setup.py install
Does this work ?
On Thursday, November 24, 2016 at 12:
Thursday, November 24, 2016 at 10:54:20 AM UTC+8, Joel Goldstick wrote:
> On Wed, Nov 23, 2016 at 9:44 PM, Cai Gengyang wrote:
> >>>> pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
> > Traceback (most recent call last):
> > File "", line 1, in
> > py
>>> pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
Traceback (most recent call last):
File "", line 1, in
pygame.draw.rect(screen, BROWN, [60, 400, 30, 45])
NameError: name 'pygame' is not defined
How to solve this error ?
--
https://mail.python.org/mailman/listinfo/python-list
I'm moving on to chapter 9
(http://programarcadegames.com/index.php?lang=en&chapter=lab_functions) of
programarcadegames for the time being and going back to chapter 8 later (its
just fucking frustrating and doesn't seem to work for the time being and I have
a very bad temper).
At least for c
er 9, 2016 at 11:42:33 AM UTC+8, Steve D'Aprano wrote:
> On Sun, 9 Oct 2016 01:51 pm, Cai Gengyang wrote:
>
> > This is my latest result : I copy and pasted one line at a time into the
> > IDLE and used ONLY the "enter-return" button to move on to the next line
ed
On Sunday, October 9, 2016 at 8:15:07 AM UTC+8, Gregory Ewing wrote:
> Cai Gengyang wrote:
> > Somehow it still doesnt work --- it keeps giving the syntaxerror,
> > inconsistent use of tabs and indentation message EVEN though i use only the
> > enter an
, 2016 at 1:21:50 PM UTC+5:30, Cai Gengyang wrote:
> > > This is the result when I copy and paste it one line at a time :
> > >
> > > >>> rect_x = 50
> > > >>> rect_y = 50
> > > >>> while not done:
for event in pygame.event.get():
if event.type == pygame.QUIT:
done = True
SyntaxError: invalid syntax
On Saturday, October 8, 2016 at 3:02:09 PM UTC+8, Steve D'Aprano wrote:
> On Sat, 8 Oct 2016 05:29 pm, Cai Gengya
t me know what you get ...
On Saturday, October 8, 2016 at 2:19:26 PM UTC+8, Steve D'Aprano wrote:
> On Sat, 8 Oct 2016 05:02 pm, Cai Gengyang wrote:
>
> > Any idea how to correct this error ? Looks fine to me
>
> As usual, the first and most important rule of
Any idea how to correct this error ? Looks fine to me
>>> rect_x = 50
# Main Program Loop ---
while not done:
for event in pygame.event.get(): # User did something
if event.type == pygame.QUIT: # If user clicked close
done = True # Flag that we are d
On Tuesday, September 27, 2016 at 2:14:05 PM UTC+8, Cai Gengyang wrote:
> We're trying to help, but we need to know more about the
> environment you're using to enter your code.
>
> What operating system are you using? --- OSX Yosemite Version 10.10.2
>
> How are
:20:17 PM UTC+8, Gregory Ewing wrote:
> Cai Gengyang wrote:
> > I'll still be asking for help here. Please help out a newbie.
>
> We're trying to help, but we need to know more about the
> environment you're using to enter your code.
>
> What operating system a
d not locked up by a few
academics and institutions.
On Tuesday, September 27, 2016 at 6:00:40 AM UTC+8, bream...@gmail.com wrote:
> On Monday, September 26, 2016 at 9:57:52 PM UTC+1, Cai Gengyang wrote:
> > Ok it works now:
> >
> > >>>for row in range(10
statement is one space different from each
other. Forgive me if i can't explain things clearly over the forum
On Tuesday, September 27, 2016 at 3:57:18 AM UTC+8, Larry Hudson wrote:
> On 09/26/2016 08:25 AM, Cai Gengyang wrote:
> > I just wanted to note that sometimes the code works,
What is a tab and what is a space in python and what's the difference ?
Which piece of code is indented with tabs and which one is indented with spaces
?
On Tuesday, September 27, 2016 at 12:40:16 AM UTC+8, MRAB wrote:
> On 2016-09-26 16:25, Cai Gengyang wrote:
> > I just wante
ember 26, 2016 at 5:36:26 PM UTC+8, Steven D'Aprano wrote:
> On Monday 26 September 2016 18:32, Cai Gengyang wrote:
>
> > These are my attempts ---
>
> That's nice. Do you have a question?
>
>
> > SyntaxError: inconsistent use of tabs and spaces in indentatio
tabs and spaces in indentation
>>> for row in range(10):
for column in range(10):
print("*",end=" ")
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * *
On Monday, September 26, 2016 at 4:16:37 PM UTC+8, Steven D'Aprano wrote:
> On Monday 26 September 2016 17:21, J
So what do i need to do to correct the error ?
Regards
On Monday, September 26, 2016 at 2:48:16 PM UTC+8, Terry Reedy wrote:
> On 9/26/2016 1:59 AM, Cai Gengyang wrote:
> > Why is it that you need a print() at the end to create the table for
> > example 1:
> >
> > E
Why is it that you need a print() at the end to create the table for example 1:
Example 1 ---
>>> for row in range(10):
for column in range(10):
print("*",end=" ")
# Print a blank line for next row
print()
* * * * * * * * * *
* * * * * * * * * *
* * * * * * * * * *
On Wednesday, September 21, 2016 at 11:22:42 AM UTC+8, Steve D'Aprano wrote:
> On Wed, 21 Sep 2016 01:00 pm, Cai Gengyang wrote:
>
> > So I am going through chapter 7.1 (Data Types) of
> > http://programarcadegames.com/index.php… What do these terms (input and
> >
So I am going through chapter 7.1 (Data Types) of
http://programarcadegames.com/index.php…
What do these terms (input and output) mean --- Can someone explain in plain
English and layman's terms ? Thanks a lot ...
>>> type(3)
>>> type(3.145)
>>> type("Hi there")
>>> type(True)
--
https://ma
Yay !
On Sunday, August 14, 2016 at 1:40:09 AM UTC+8, Chris Angelico wrote:
> On Sun, Aug 14, 2016 at 3:06 AM, Cai Gengyang wrote:
> > Oh ok, so for the first block , it works because the indentation is the
> > same for all 3 "print" statements , i.e. the indentation
rint("Indented two spaces.")
print("Indented four. This will generate an error.")
print("The computer will want you to make up your mind.")
Am i correct ?
On Saturday, August 13, 2016 at 7:12:19 PM UTC+8, Marko Rauhamaa wrote:
> Cai Gengyang :
>
Indentation matters. Each line under the if statement that is indented will
only be executed if the statement is true:
if a == 1:
print("If a is one, this will print.")
print("So will this.")
print("And this.")
print("This will always print because it is not indented.")
Indentation
Yea, using IDLE on OSX, Python 3.4.3.
Yeah it works now ... I had to increase the font size and the indentation
width. When that happened , it could define miles_driven
On Thursday, August 11, 2016 at 2:09:11 AM UTC+8, Zachary Ware wrote:
> On Wed, Aug 10, 2016 at 12:39 PM, Cai Gengy
I managed to get this piece of code to work :
>>> print("This program calculates mpg.")
This program calculates mpg.
>>> milesdriven = input("Enter miles driven:")
Enter miles driven: 50
>>> milesdriven = float(milesdriven)
>>> gallonsused = input("Enter gallons used:")
Enter gallons used: 100
>>>
ote:
> > On 08/06/2016 03:51 PM, Cai Gengyang wrote:
> >> As in, any recommended websites that helps users create complex games in
> >> Python ?
> >
> > I imagine you create a complex game in Python the same way you'd do it
> > in just about any othe
As in, any recommended websites that helps users create complex games in Python
?
On Sunday, August 7, 2016 at 5:41:25 AM UTC+8, Ian wrote:
> On Aug 6, 2016 11:57 AM, "Cai Gengyang" wrote:
>
> How do I make a game in Python ?
>
>
> import random
>
> answe
How do I make a game in Python ?
--
https://mail.python.org/mailman/listinfo/python-list
number
8 + 5i is not a floating number because it is a complex number.
Is 3.0 a floating number ? It is a rational number, not an integer right ?
On Saturday, July 30, 2016 at 6:34:25 PM UTC+8, Steven D'Aprano wrote:
> On Sat, 30 Jul 2016 08:21 pm, Cai Gengyang wrote:
>
>
Cool ... can you give a concrete example ?
On Friday, July 29, 2016 at 10:27:08 PM UTC+8, Steven D'Aprano wrote:
> On Fri, 29 Jul 2016 07:44 pm, Cai Gengyang wrote:
>
> > Can someone explain in layman's terms what "float" means ?
>
> Floating point numb
Can someone explain in layman's terms what "float" means ?
>>> x = float(input("Write a number"))
Write a number 16
--
https://mail.python.org/mailman/listinfo/python-list
How to debug this ?
>>> print "This line will be printed."
SyntaxError: Missing parentheses in call to 'print'
--
https://mail.python.org/mailman/listinfo/python-list
How to debug this error message ?
print('You will be ' + str(int(myAge) + 1) + ' in a year.')
Traceback (most recent call last):
File "", line 1, in
print('You will be ' + str(int(myAge) + 1) + ' in a year.')
ValueError: invalid literal for int() with base 10: ''
--
https://mail.python.org
re
by users
As Paul Graham mentioned : "Startups are often ruthless competitors, but
they're competing in a game won by making what people want."
On Saturday, May 14, 2016 at 12:52:58 AM UTC+8, Ned Batchelder wrote:
> On Friday, May 13, 2016 at 12:05:33 PM UTC-4, Cai Gengyang
sites have very poor generic design and are unappealing to look at.
edx.org is a great example , perhaps a competitor / clone with different
functionalities and better design , more videos, graphics , more interactive
On Wednesday, May 11, 2016 at 3:07:17 AM UTC+8, DFS wrote:
> On
Ok, so after reading YCombinator's RFS, I have decided that I want to work on
this :
---
EDUCATION
If we can fix education, we can eventually do everything else on this list.
The fir
essay on meanness and success
--http://paulgraham.com/mean.html
On Monday, May 9, 2016 at 1:53:31 AM UTC+8, alister wrote:
> On Mon, 09 May 2016 03:12:14 +1000, Steven D'Aprano wrote:
>
> > On Sun, 8 May 2016 08:21 pm, Cai Gengyang wrote:
> >
&
I just "clicked" through the lesson on Conditionals and Control Flows and am on
the lesson "PygLatin" .
This will hopefully be a more interesting and interactive lesson because I will
be building a PygLatin Translator ...
It seems to me like it will take a long time before I can reach the point
statement
is True
bool_five = True and True --- This should give True because both statements are
True
On Wednesday, May 4, 2016 at 11:10:28 PM UTC+8, Jussi Piitulainen wrote:
> Cai Gengyang writes:
>
> > I am trying to understand the boolean operator "and" in Pyth
I am trying to understand the boolean operator "and" in Python. It is supposed
to return "True" when the expression on both sides of "and" are true
For instance,
1 < 3 and 10 < 20 is True --- (because both statements are true)
1 < 5 and 5 > 12 is False --- (because both statements are false)
b
f this piece is true
On Wednesday, May 4, 2016 at 10:13:13 AM UTC+8, Christopher Reimer wrote:
> On 5/3/2016 4:20 AM, Cai Gengyang wrote:
> > So I have completed up to CodeAcademy's Python Unit 2 , now moving on to
> > Unit3 : Conditionals and Control Flow.
> >
> >
So I have completed up to CodeAcademy's Python Unit 2 , now moving on to Unit3
: Conditionals and Control Flow.
But I feel my motivation wavering , at times I get stuck and frustrated when
trying to learn a new programming language ?
This might not be a technical question per say, but it is a
Ok, I got it to work with no error message finally ...
Enter a name: cai gengyang
Enter an adjective: beautiful
Enter a second adjective: honest
Enter a third adjective: pretty
Enter a verb: hit
Enter a second verb: run
Enter a third verb: jump
Enter a noun: honesty
Enter a noun: patience
I changed it to all lowercase, this time I get a different error message though
(a TypeError message)
# This program does the following ... writes a Mad Libs story
# Author: Cai Gengyang
print "Mad Libs is starting!"
name = raw_input("Enter a name: ")
adjective1 =
Python Madlibs.py code and error message --- Anyone can help? I keep getting
stuck here ...
# This program does the following ... writes a Mad Libs story
# Author: Cai Gengyang
print "Mad Libs is starting!"
name = raw_input("Enter a name: ")
adjective1 = raw_input
So after reading YCombinator's new RFS, I have decided I want to build an
educational software platform written in Python (mostly, if not entirely).
Here is the description from YCombinator's RFS :
If we can fix education, we can eventually do everything else on this list.
The first attempts to
:59:36 AM UTC+8, Ned Batchelder wrote:
> On Tuesday, November 24, 2015 at 9:29:30 AM UTC-5, Mark Lawrence wrote:
> > On 24/11/2015 14:07, Denis McMahon wrote:
> > > On Tue, 24 Nov 2015 02:04:56 -0800, Cai Gengyang wrote:
> > >
> > >> Here's a dict
results = [
{"id": 1, "name": "ensheng", "score": 10},
{"id": 2, "name": "gengyang", "score": 12},
{"id": 3, "name": "jordan", "score": 5},
]
I want to find gengyang's score. This is what I tried :
>>> print((results["gengyang"])["score"])
but I got an error message instead :
Traceback (most r
int((results["gengyang"])["maths"])
10
On Tue, Nov 24, 2015 at 7:10 PM, Arie van Wingerden
wrote:
> print((results["gengyang"])["maths"])
>
> 2015-11-24 12:04 GMT+01:00 Cai Gengyang :
>
>> results = {
>> "gengyang": { &
Its cool ... No problem
On Tuesday, November 24, 2015 at 7:05:25 PM UTC+8, Chris Angelico wrote:
> On Tue, Nov 24, 2015 at 9:35 PM, Peter Otten <__pete...@web.de> wrote:
> > Yeah, the error message really should be
> >
> > "NameError: name 'result' is not defined; did you mean 'results'?"
> >
> >
results = {
"gengyang": { "maths": 10, "english": 15},
"ensheng": {"maths": 12, "english": 10},
"jordan": {"maths": 9, "english": 13}
}
How do you get gengyang's maths scores ?
Thank you ...
--
https://mail.python.org/mailman/listinfo/python-list
Yup, thanks a lot ... it works now !
>>> results = {
"gengyang": 14,
"ensheng": 13,
"jordan": 12
}
>>> results["jordan"]
12
On Tuesday, November 24, 2015 at 6:40:26 PM UTC+8, Peter Otten wrote:
> Cai Gengyang wrote:
>
>
File "", line 1, in
result["jordan"]
NameError: name 'result' is not defined
>>> result[max(result)]
Traceback (most recent call last):
File "", line 1, in
result[max(result)]
NameError: name 'result' is not defined
>>
Here's a dictionary with 3 values :
results = {
"gengyang": 14,
"ensheng": 13,
"jordan": 12
}
How do I define a function that takes the last of the 3 items in that list and
returns Jordan's results i.e. (12) ?
Thanks a lot !
Gengyang
--
https://mail.python.org/mailman/listinfo/python-l
Ok, I will look through the Flask tutorials then ...
On Monday, November 23, 2015 at 8:21:28 PM UTC+8, Chris Angelico wrote:
> On Mon, Nov 23, 2015 at 8:55 PM, Cai Gengyang wrote:
> > So I have gone through the CodeAcademy Python modules and decided to jump
> > straight
Ok,
So I have gone through the CodeAcademy Python modules and decided to jump
straight into a project.
I want to create a dynamic web-based site like this --- https://www.wedpics.com
using Python
How / where do I start ?
Thanks a lot !
Gengyang
--
https://mail.python.org/mailman/listinf
meal = 44.50
tax = 0.0675
tip = 0.15
meal = meal + meal * tax
total = meal + meal * tip
print("%.2f" % total)
What do the lines inside the parentheses in this statement print("%.2f" %
total) mean ?
What does "%.2f" % total represent ?
Thanks alot ...
Gengyang
--
https://mail.python.org
Hmm .. I am a slow learner and have poor memory. Sometimes when I see a new
programming operator, I have to type it out so that I can remember it and let
it sink into my brain
On Sunday, November 22, 2015 at 6:24:28 AM UTC+8, Jon Ribbens wrote:
> On 2015-11-21, Cai Gengyang wr
Comparators, interesting ...
>>> booltwo = (10 + 18) == 3**17
>>> booltwo
False
>>> boolone = (50 - 35) > 35
>>> boolone
False
>>> booltwo = (65 - 35) > 15
>>> booltwo
True
>>> boolalpha = 3 < 6
>>> boolalpha
True
>>> boolbeta = 100 == 10*30
>>> boolbeta
False
>>>
--
https://mail.python.org/mail
>>> bill = 100
>>> bill *= 1.08
>>> bill
108.0
>>>
On Saturday, November 21, 2015 at 9:47:29 PM UTC+8, Frank Millman wrote:
> "Cai Gengyang" wrote in message
> news:a76b1b5b-4321-41bb-aeca-0dac78775...@googlegroups.com...
>
This is a piece of code that calculates tax and tip :
def tax(bill):
"""Adds 8% tax to a restaurant bill."""
bill *= 1.08
print "With tax: %f" % bill
return bill
def tip(bill):
"""Adds 15% tip to a restaurant bill."""
bill *= 1.15
print "With tip: %f" % bill
return
k Millman wrote:
> "Cai Gengyang" wrote in message
> news:e5d80196-61c5-44d9-bec8-dc563d58f...@googlegroups.com...
>
> > This is a piece of code about comparators :
>
>
> > j# Assign True or False as appropriate on the lines below!
>
> [snip rest of co
his is the error I got :
Traceback (most recent call last):
File "python", line 1, in
NameError: name 'j' is not defined
Any ideas how to debug this ?
Thanks a lot!
Appreciate it
Cai Gengyang
--
https://mail.python.org/mailman/listinfo/python-list
a tech-heavy company
and all the main founders and employees should be excellent programmers. But
for the moment, I plan to write the initial prototype myself ...
On Friday, November 20, 2015 at 12:00:34 AM UTC+8, Michael Torrie wrote:
> On 11/19/2015 04:59 AM, Cai Gengyang wr
On Thursday, November 19, 2015 at 7:00:05 AM UTC-5, Cai Gengyang wrote:
> > From YCombinator's new RFS, This is the problem I want to solve as it is a
> > severe problem I face myself and something I need. I want to write this app
> > in Python as I heard that Python is
with ones tackling the entire package.
Thanks alot !
Cai Gengyang
--
https://mail.python.org/mailman/listinfo/python-list
I want to write a program in Python that does this
"Write a program that prints the numbers from 1 to 100. But for multiples of
three print "Fizz" instead of the number and for the multiples of five print
"Buzz". For numbers which are multiples of both three and five print
"FizzBuzz"."
Ho
y, October 15, 2015 at 1:47:50 AM UTC+8, Ian wrote:
> On Wed, Oct 14, 2015 at 11:04 AM, Cai Gengyang wrote:
> > So I am going through this article on Python for newbies
> > ---http://askpython.com/execute-python-scripts/
>
> That looks like a terrible resource. There are plen
On Thursday, October 15, 2015 at 1:18:27 AM UTC+8, paul.her...@gmail.com wrote:
> > Where do I find the "command line" ?
>
> Welcome to Python.
>
> Starting a command shell depends on which operating system you are running.
>
> If you are on Microsoft Windows, choose the Start button, then type
So I am going through this article on Python for newbies
---http://askpython.com/execute-python-scripts/
Managed to create a file with these contents :
1 #!/usr/bin/env python3
2
3 print('hello world')
and saved it as hello.py
Next step, I wanted to open the 'command line' so I can type 'pyth
lying auth.0006_require_contenttypes_0002... OK
Applying sessions.0001_initial... OK
CaiGengYangs-MacBook-Pro:mysite CaiGengYang$
On Monday, September 28, 2015 at 2:20:39 PM UTC+8, Andrea D'Amore wrote:
> On 2015-09-28 05:26:35 +, Cai Gengyang said:
>
> > File "
tember 28, 2015 at 8:10:26 AM UTC+8, Steven D'Aprano wrote:
> On Mon, 28 Sep 2015 03:45 am, Cai Gengyang wrote:
>
> > http://pastebin.com/RWt1mp7F --- If anybody can find any errors with this
> > settings.py file, let me know !
> >
> > Can't seem to f
1 - 100 of 115 matches
Mail list logo