Re: Help with python code

2016-03-29 Thread Wildman via Python-list
On Tue, 29 Mar 2016 21:19:05 +, Rob Gaddi wrote: >> menu = input("Enter the type of pizza that you want to order from 1-5 \n") >> while menu>5 or menu <=0: >> menu = input ("Enter the right number ") >> pizza_cost = pizzatype[menu] As it has already been pointed out, a Python list starts

Re: Help with python code

2016-03-29 Thread Rob Gaddi
Yum Di wrote: > I still don't get it.. Sorry, I'm still quite new to this > I've have made few minor changes, but it still doesn't work Then try entering one line at a time of your program into the interactive interpreter. Copy and paste is fine, but use the interpreter to look at the actual val

Re: Help with python code

2016-03-29 Thread Yum Di
import random import time pizzatype = [3.50,4.20,5.20,5.80,5.60] drinktype = [0.90,0.80,0.90] topping = [0.50,0.50,0.50,0.50] def Total_cost_cal (pt ,dt ,t): total = pt + dt + t return total print ("Welcome to Pizza Shed!") order = raw_input ("\n\nPLEASE PRESS ENTER TO ORDER." ) tablen

Re: Help with python code

2016-03-29 Thread Rob Gaddi
okdk wrote: > This is my code > import random > import time > > pizzatype = [3.50,4.20,5.20,5.80,5.60] > drinktype = [0.90,0.80,0.90] > topping = [0.50,0.50,0.50,0.50] > > def Total_cost_cal (pt ,dt ,t): > total = pt + dt + t > return total > > print ("Welcome to Pizza Shed!") > > order =

Re: Help with python code

2016-03-29 Thread BartC
On 29/03/2016 22:00, okdk wrote: pizzatype = [3.50,4.20,5.20,5.80,5.60] drinktype = [0.90,0.80,0.90] topping = [0.50,0.50,0.50,0.50] total_cost = total_cost_cal(pizzatotal, drinktotal, topping_cost) print ("") print ("Calculating bill") print ("---

Help with python code

2016-03-29 Thread okdk
This is my code import random import time pizzatype = [3.50,4.20,5.20,5.80,5.60] drinktype = [0.90,0.80,0.90] topping = [0.50,0.50,0.50,0.50] def Total_cost_cal (pt ,dt ,t): total = pt + dt + t return total print ("Welcome to Pizza Shed!") order = raw_input ("\n\nPLEASE PRESS ENTER TO O

Re: required help with python code.

2015-08-25 Thread Peter Otten
Srinivas, Jostna wrote: > I am trying to write a python code to create tableau data extract using > tableau API. > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn't get over net. Its > critical requirement and we need your help. Posting a pictur

Re: required help with python code.

2015-08-25 Thread Chris Angelico
On Tue, Aug 25, 2015 at 6:20 PM, Srinivas, Jostna wrote: > > In the process I am facing following error. > > Please help me to fix. I tried a lot but couldn’t get over net. Its critical > requirement and we need your help. > Please do two things to help us to help you: 1) Make a simple file tha

Re: required help with python code.

2015-08-25 Thread Ben Finney
"Srinivas, Jostna" writes: > I am trying to write a python code to create tableau data extract > using tableau API. What is that? Does it have a website? Does it have its own community of users and developers? Your questions about Python are welcome here, and we'll help if we can. That said, if

required help with python code.

2015-08-25 Thread Srinivas, Jostna
Hi, I am trying to write a python code to create tableau data extract using tableau API. In the process I am facing following error. Please help me to fix. I tried a lot but couldn't get over net. Its critical requirement and we need your help. [cid:image001.png@01D0DC37.285DEAE0] r Regards

Re: Help with python code!

2013-04-02 Thread Jason Friedman
> Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases. I don't need to code the tests, just give some high level tests. As > far as I can make out it is some system where you input your name

Re: Help with python code!

2013-04-01 Thread Alister
On Sun, 31 Mar 2013 14:32:21 -0700, gerrymcgovern wrote: > On Sunday, March 31, 2013 5:27:06 PM UTC-4, Roy Smith wrote: >> In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, >> >> jojo wrote: >> >> >> >> > Thanks for your replies. Just to be clear this is for a interview and

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 9:02 AM, Mark Lawrence wrote: > On 31/03/2013 22:21, Chris Angelico wrote: >>> >>>sue = time.mktime( >>> (int(m.group(7)), int(months[m.group(2)]), int(m.group(3)), >>>int(m.group(4)), int(m.group(5)), int(m.group(6)), >>>int(days[m.g

Re: Help with python code!

2013-03-31 Thread Mark Lawrence
On 31/03/2013 22:21, Chris Angelico wrote: sue = time.mktime( (int(m.group(7)), int(months[m.group(2)]), int(m.group(3)), int(m.group(4)), int(m.group(5)), int(m.group(6)), int(days[m.group(1)]), 0, 0) ) expire_time = (sue ­ current_time)/60

Re: Help with python code!

2013-03-31 Thread rurpy
On Sunday, March 31, 2013 3:27:06 PM UTC-6, Roy Smith wrote: > If this is for an interview, you really should be doing this on your > own. I assume the point of the interview is to see how well you know > Python. Please don't expect people here to take your interview for you. Maybe the interv

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:35:38 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 8:21 AM, jojo wrote: > > > Thanks for your replies. Just to be clear this is for a interview and they > > would like me to figure out what the code does and come back with some test > > cases > > > > T

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:27:06 PM UTC-4, Roy Smith wrote: > In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, > > jojo wrote: > > > > > Thanks for your replies. Just to be clear this is for a interview and they > > > would like me to figure out what the code does and co

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 8:21 AM, jojo wrote: > Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases That explains the utter lack of comments, then. In well-maintained code, you would simpl

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <4455829d-5b4a-44ee-b65f-5f72d429b...@googlegroups.com>, jojo wrote: > Thanks for your replies. Just to be clear this is for a interview and they > would like me to figure out what the code does and come back with some test > cases. I don't need to code the tests, just give some hig

Re: Help with python code!

2013-03-31 Thread jojo
On Sunday, March 31, 2013 5:13:49 PM UTC-4, Roy Smith wrote: > In article <2912c674-e30b-4339-9344-1f460cb96...@googlegroups.com>, > > jojo wrote: > > > > > for fname in dirList: > > > cmd = "keytool �printcert �file " + fname > > > for line in os.popen(cmd).readlines(): > > >line =

Re: Help with python code!

2013-03-31 Thread gerrymcgovern
On Sunday, March 31, 2013 5:21:00 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 8:06 AM, jojo wrote: > > > On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: > > >> On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > > >> > > >> > Im used to C# so the syntax looks bizarre t

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 8:06 AM, jojo wrote: > On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: >> On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: >> >> > Im used to C# so the syntax looks bizarre to me! Any help would be great. >> >> >> >> The first thing you'll need to understand abo

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <2912c674-e30b-4339-9344-1f460cb96...@googlegroups.com>, jojo wrote: > for fname in dirList: > cmd = "keytool ­printcert ­file " + fname > for line in os.popen(cmd).readlines(): >line = line.rstrip() >m = p.search(line) >if m: > sue = time.mktime( > (int(m.

Re: Help with python code!

2013-03-31 Thread Roy Smith
In article <37f23623-8bf5-421a-ab6a-34ff622c6...@googlegroups.com>, jojo wrote: > Hi - I am a newbie to python and was wondering can someone tell me what the > following code does. I need to figure out how to test it I know this is going to sound unhelpful, but if your task is to test the cod

Re: Help with python code!

2013-03-31 Thread jojo
On Sunday, March 31, 2013 4:39:11 PM UTC-4, Chris Angelico wrote: > On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > > > Im used to C# so the syntax looks bizarre to me! Any help would be great. > > > > The first thing you'll need to understand about Python syntax is that > > indentation is impor

Re: Help with python code!

2013-03-31 Thread Chris Angelico
On Mon, Apr 1, 2013 at 7:10 AM, jojo wrote: > Im used to C# so the syntax looks bizarre to me! Any help would be great. The first thing you'll need to understand about Python syntax is that indentation is important. By posting this code flush-left, you've actually destroyed its block structure. C

Help with python code!

2013-03-31 Thread jojo
Hi - I am a newbie to python and was wondering can someone tell me what the following code does. I need to figure out how to test it import time import glob import re import os current_time = time.time() + 60*60+24*30 dirList = glob.glob('\content\paytek\ejbProperties\cybersource\*.crt') q = r

Re: Newby Needs Help with Python code

2010-09-07 Thread Peter Otten
Nally Kaunda-Bukenya wrote: > I am very sorry to bother you, but I need help understanding the code that > you assisted me with. It does exactly what I needed done, I can't thank > you enough for that. I am just learning Python, and would appreciate all > the help. please see my comments below

Re: Newby Needs Help with Python code

2010-09-01 Thread Peter Otten
Nally Kaunda-Bukenya wrote: > I hope someone can help me. I am new to Python and trying to achive the > following: > 1) I would like to populate the Tot_Ouf_Area field with total area of > each unique outfall_id (code attempted below,but Tot_Ouf_Area not > populating) > 2) I would also

Re: Newby Needs Help with Python code

2010-09-01 Thread Rami Chowdhury
Hi Esther, On Wed, Sep 1, 2010 at 13:29, Nally Kaunda-Bukenya wrote: > #THE PROGRAM: > import arcgisscripting > gp=arcgisscripting.create() > gp.Workspace = "C:\\NPDES\\NPDES_PYTHON.mdb" > fc = "Outfalls_ND" > > try: >     # Set the field to create a list of unique values >     fieldname = "O

Newby Needs Help with Python code

2010-09-01 Thread Nally Kaunda-Bukenya
  Dear Python experts, I hope someone can help me. I am new to Python and trying to achive the following: 1)  I would like to populate the Tot_Ouf_Area field with total area of each unique outfall_id (code attempted below,but Tot_Ouf_Area not populating) 2)  I would also like to get the