CodeAcademy Python Tip Calculator

2017-09-10 Thread Cai Gengyang
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

Python Boolean Logic

2017-09-22 Thread Cai Gengyang
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

Re: Python Boolean Logic

2017-09-22 Thread Cai Gengyang
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

Printing a Chunk Of Words

2017-09-25 Thread Cai Gengyang
""" 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

Boolean Expressions

2017-09-26 Thread Cai Gengyang
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

Re: Boolean Expressions

2017-09-26 Thread Cai Gengyang
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

Re: Boolean Expressions

2017-09-26 Thread Cai Gengyang
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

Re: Boolean Expressions

2017-09-27 Thread Cai Gengyang
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

Finding Old Posts on Python

2017-10-07 Thread Cai Gengyang
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

Searching For Old Posts On Python

2017-10-16 Thread Cai Gengyang
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

Re: Searching For Old Posts On Python

2017-10-16 Thread Cai Gengyang
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. >

Re: Searching For Old Posts On Python

2017-10-16 Thread Cai Gengyang
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

Re: Searching For Old Posts On Python

2017-10-16 Thread Cai Gengyang
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

Re: Searching For Old Posts On Python

2017-10-23 Thread Cai Gengyang
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

While, If, Count Statements

2017-11-27 Thread Cai Gengyang
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

Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
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 > > &

Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
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 > >

Re: While, If, Count Statements

2017-11-28 Thread Cai Gengyang
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: > >

Writing a chess-playing AI like Alphago in Python

2017-12-23 Thread Cai Gengyang
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

Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Cai Gengyang
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 >>>

Re: Why can't I define a variable like "miles_driven" with an underscore in Python 3.4.3 ?

2016-08-10 Thread Cai Gengyang
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

Python Indentation

2016-08-13 Thread 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

Re: Python Indentation

2016-08-13 Thread Cai Gengyang
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 : >

Re: Python Indentation

2016-08-13 Thread Cai Gengyang
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

Data Types

2016-09-20 Thread Cai Gengyang
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

Re: Data Types

2016-09-20 Thread Cai Gengyang
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 > >

Nested for loops and print statements

2016-09-25 Thread Cai Gengyang
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() * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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,

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
: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

Re: Nested for loops and print statements

2016-09-26 Thread Cai Gengyang
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

SyntaxError: multiple statements found while compiling a single statement

2016-10-07 Thread Cai Gengyang
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

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-07 Thread Cai Gengyang
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

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
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

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
, 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:

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
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

Re: SyntaxError: multiple statements found while compiling a single statement

2016-10-08 Thread Cai Gengyang
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

Function to take the minimum of 3 numbers

2016-10-09 Thread Cai Gengyang
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

NameError

2016-11-23 Thread Cai Gengyang
>>> 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

Re: NameError

2016-11-23 Thread Cai Gengyang
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

Re: NameError

2016-11-23 Thread Cai Gengyang
==> 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:

Re: NameError

2016-11-24 Thread Cai Gengyang
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

Re: NameError

2016-11-24 Thread Cai Gengyang
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

Re: NameError

2016-11-24 Thread Cai Gengyang
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

Re: NameError

2016-11-24 Thread Cai Gengyang
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

Re: NameError

2016-11-24 Thread Cai Gengyang
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

Re: NameError

2016-11-24 Thread Cai Gengyang
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 > &

Re: NameError

2016-11-25 Thread Cai Gengyang
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

Python Madlibs.py code and error message

2016-04-27 Thread Cai Gengyang
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

Re: Python Madlibs.py code and error message

2016-04-27 Thread Cai Gengyang
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 =

Re: Python Madlibs.py code and error message

2016-05-03 Thread Cai Gengyang
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

How to become more motivated to learn Python

2016-05-03 Thread Cai Gengyang
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

Re: How to become more motivated to learn Python

2016-05-03 Thread Cai Gengyang
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. > > > >

Conditionals And Control Flows

2016-05-04 Thread Cai Gengyang
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

Re: Conditionals And Control Flows

2016-05-04 Thread Cai Gengyang
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

Python PygLatin

2016-05-08 Thread Cai Gengyang
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

Re: Python PygLatin

2016-05-08 Thread Cai Gengyang
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: > > &

An educational site written in Python (from YCombinator's RFS)

2016-05-09 Thread Cai Gengyang
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

Re: An educational site written in Python (from YCombinator's RFS)

2016-05-13 Thread 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

Re: An educational site written in Python (from YCombinator's RFS)

2016-05-13 Thread Cai Gengyang
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

Python Print Error

2016-07-26 Thread Cai Gengyang
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

Python Print Error

2016-07-28 Thread Cai Gengyang
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

Float

2016-07-29 Thread Cai Gengyang
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

Re: Float

2016-07-30 Thread Cai Gengyang
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

Re: Float

2016-07-30 Thread Cai Gengyang
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: > >

How do I make a game in Python ?

2016-08-06 Thread Cai Gengyang
How do I make a game in Python ? -- https://mail.python.org/mailman/listinfo/python-list

Re: How do I make a game in Python ?

2016-08-06 Thread Cai Gengyang
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

Re: How do I make a game in Python ?

2016-08-07 Thread Cai Gengyang
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

Re: Returning a result from 3 items in a list

2015-11-25 Thread Cai Gengyang
: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

An Educational Software Platform written in Python

2015-11-28 Thread Cai Gengyang
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

A photo/image/video sharing app in Python

2015-09-21 Thread Cai Gengyang
forgot most of it my now) How / where do i start ? Any suggestions / resources / recommendations appreciated. Thanks a lot ! Cai Gengyang -- https://mail.python.org/mailman/listinfo/python-list

Re: A photo/image/video sharing app in Python

2015-09-21 Thread Cai Gengyang
On Monday, September 21, 2015 at 7:38:21 PM UTC+8, Great Avenger Singh wrote: > On Monday, 21 September 2015 15:08:53 UTC+5:30, Cai Gengyang wrote: > > Hello, > > > > > > So, I want to use Python to design a photo/image/video sharing app that i > > can &g

Re: A photo/image/video sharing app in Python

2015-09-21 Thread Cai Gengyang
real-time video-cartoons that they can then share with other users. It's going to be what differentiates my product from other services (as far as I can tell, no other site currently in existence has such a capability) Guess the first step I would need to do is to create a basic website in Python us

Re: A photo/image/video sharing app in Python

2015-09-21 Thread Cai Gengyang
On Tuesday, September 22, 2015 at 4:34:45 AM UTC+8, Christian Gollwitzer wrote: > Am 21.09.15 um 17:16 schrieb Cai Gengyang: > > 2) A system where where the users can then edit these > > photos/images/videos into short , funny cartoons/videos > > > > This one&#

Re: A photo/image/video sharing app in Python

2015-09-22 Thread Cai Gengyang
On Tuesday, September 22, 2015 at 2:34:20 PM UTC+8, Chris Angelico wrote: > On Tue, Sep 22, 2015 at 3:53 PM, Cai Gengyang wrote: > > A piece of software that would let end users easily create gorgeous > > real-life, real-time cartoons on the web might not exist yet. But if it &g

Re: A photo/image/video sharing app in Python

2015-09-22 Thread Cai Gengyang
On Tuesday, September 22, 2015 at 5:48:26 PM UTC+8, Cai Gengyang wrote: > On Tuesday, September 22, 2015 at 2:34:20 PM UTC+8, Chris Angelico wrote: > > On Tue, Sep 22, 2015 at 3:53 PM, Cai Gengyang wrote: > > > A piece of software that would let end users easily create gorgeou

Installing pip and django

2015-09-22 Thread Cai Gengyang
So these are my results when I type these commands into "Terminal" in an attempt to install pip and django --- From the output, it seems that I have successfully installed pip and django CaiGengYangs-MacBook-Pro:~ CaiGengYang$ pip Usage: pip [options] Commands: install

Video Tutorial Online On How To Create a Basic Dynamic Website In Python?

2015-09-23 Thread Cai Gengyang
something visual which I can follow step-by-step ... Thanks a lot. Cai Gengyang -- https://mail.python.org/mailman/listinfo/python-list

Django (Python Web Framework) Tutorial

2015-09-26 Thread Cai Gengyang
of the document root, such as /home/mycode." and how do you "Put your code in this directory" ? Thanks a lot ! Appreciate it Cai Gengyang -- https://mail.python.org/mailman/listinfo/python-list

Re: Django (Python Web Framework) Tutorial

2015-09-26 Thread Cai Gengyang
On Sunday, September 27, 2015 at 11:46:13 AM UTC+8, John Gordon wrote: > In <1421a34f-d8cc-4367-adab-2c2b46504...@googlegroups.com> Cai Gengyang > writes: > > > Question : I am a little confused about the last paragraph : What exactly > > is a "directory outsi

Django Tutorial (Database setup) Question

2015-09-27 Thread Cai Gengyang
Hello all ! So I am going through the (Database setup) chapter of this tutorial (https://docs.djangoproject.com/en/1.8/intro/tutorial01/) --- Its the section right after the first chapter on "Creating a project" I opened up mysite/settings.py as per the instructions on the Django tutorial. Ho

Re: Python IDLE won't start

2015-09-27 Thread Cai Gengyang
On Sunday, September 27, 2015 at 4:41:54 PM UTC+8, Jacob Chaar wrote: > Hi there, > > So, I download Python 3.5.0 and I while I execute the Python IDLE, it won't > start up. Also, I try to open the python command line and a message error > pop up. > > If you can help me, it will be really a

Re: Django Tutorial (Database setup) Question

2015-09-27 Thread Cai Gengyang
7;, ^ SyntaxError: invalid syntax CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ On Monday, September 28, 2015 at 12:09:04 AM UTC+8, Joel Goldstick wrote: > On Sun, Sep 27, 2015 at 3:32 AM, Cai Gengyang wrote: > Hello all ! > > > &

Re: Django Tutorial (Database setup) Question

2015-09-27 Thread Cai Gengyang
^ SyntaxError: invalid syntax CaiGengYangs-MacBook-Pro:mysite CaiGengYang$ On Mon, Sep 28, 2015 at 12:08 AM, Joel Goldstick wrote: > > > On Sun, Sep 27, 2015 at 3:32 AM, Cai Gengyang > wrote: > >> Hello all ! >> >> So I am going

Help with Debugging

2015-09-27 Thread Cai Gengyang
http://pastebin.com/RWt1mp7F --- If anybody can find any errors with this settings.py file, let me know ! Can't seem to find anything wrong with it ... -- https://mail.python.org/mailman/listinfo/python-list

Re: Help with Debugging

2015-09-27 Thread Cai Gengyang
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

Re: Help with Debugging

2015-09-27 Thread Cai Gengyang
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 "

Execute Python Scripts

2015-10-14 Thread Cai Gengyang
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

Re: Execute Python Scripts

2015-10-14 Thread Cai Gengyang
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

Re: Execute Python Scripts

2015-10-14 Thread Cai Gengyang
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

A Program that prints the numbers from 1 to 100

2015-11-14 Thread Cai Gengyang
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

Writing a Financial Services App in Python

2015-11-19 Thread Cai Gengyang
with ones tackling the entire package. Thanks alot ! Cai Gengyang -- https://mail.python.org/mailman/listinfo/python-list

Re: Writing a Financial Services App in Python

2015-11-19 Thread Cai Gengyang
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

Re: Writing a Financial Services App in Python

2015-11-19 Thread Cai Gengyang
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

Traceback error

2015-11-20 Thread Cai Gengyang
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

Re: Traceback error

2015-11-20 Thread Cai Gengyang
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

  1   2   >