I need help figuring why my GraphicsWindow empty, I cannot figure out why it is
empty.
Here is my code :
# Import graphics from module
from graphics import GraphicsWindow
tileSize = 0
def main() :
# Define global variables
tilesInRow = 0
tilesInCol = 0
gapX = 0
gap
I accidently used 'exit' in a loop where I meant to use 'break' and, in that
case, the program seemed to work as expected but in some cases 'exit' seems
to behave differently from 'break'. For example, in this code snippet using
'exit' or 'break' produces the same result:
for i in range(10):
i
My response is interleaved with yours, below.
On Thu, Nov 20, 2014 at 09:20:27PM +, Stephanie Morrow wrote:
> Hi there,
>
> I have been posed with the following challenge:
>
> "Create a script that will ask for a number. Check if their input is a
> legitimate number. If it is, multiply it by
On Thu, 20 Nov 2014 21:20:27 +
Stephanie Morrow wrote:
> Hi there,
>
> I have been posed with the following challenge:
>
> "Create a script that will ask for a number. Check if their input is a
> legitimate number. If it is, multiply it by 12 and print out the result."
>
> I was able to do
import fileinput
def parseLine(a):
x = a.split('/')
b = x[1].split(':')
c = b[0].split('.')
y = c[0]
z = int(b[2])
return x[0], y, z
print('{:>4}{:>10}{:>8}{:>8}'.format('','canofica','lnvd','msd'))
data = [0, 0, 0]
prevDate = "None"
for line in fileinput.input():
#!/usr/bin/env python3.4
good = False
s = input('Enter a number: ')
a = s.split('.')
n = len(a)
if n <= 2:
for y in a:
if y.isdigit():
good = True
else:
good = False
exit
else:
good = False
if good:
num = float(s)
print(num * 12)
e
On 20/11/14 21:20, Stephanie Morrow wrote:
input = raw_input("Insert a number: ")
if input.isdigit():
print int(input) * 12
else:
print False
/However/, a colleague of mine pointed out that a decimal will return as
False. As such, we have tried numerous methods to allow it to divide
What else could I do in that testing portion that would allow for a decimal
point? In order for a decimal to be True, it would have to accept both the
digits and the decimal point.
On Thu, Nov 20, 2014 at 10:36 PM, Danny Yoo wrote:
> > I have been posed with the following challenge:
> >
> > "Cr
On Thu, Nov 20, 2014 at 3:05 PM, Stephanie Morrow wrote:
> What else could I do in that testing portion that would allow for a decimal
> point? In order for a decimal to be True, it would have to accept both the
> digits and the decimal point.
Let's tackle a problem that's tangent but related,
> I have been posed with the following challenge:
>
> "Create a script that will ask for a number. Check if their input is a
> legitimate number. If it is, multiply it by 12 and print out the result."
>
> I was able to do this with the following code:
>
> input = raw_input("Insert a number: ")
> if
Hi there,
I have been posed with the following challenge:
"Create a script that will ask for a number. Check if their input is a
legitimate number. If it is, multiply it by 12 and print out the result."
I was able to do this with the following code:
input = raw_input("Insert a number: ")
if inp
11 matches
Mail list logo