I am beginner...I want to know best book to start with
when it comes with python programming
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
That depends on what your motivation is for learning python. I'd start
with a few hello world tutorial online. like print "hello world"/
python 3.0 print("hello world"), and on that not, decide on the
version you want to use on your system first.
___
Tuto
bug in the previous code so the final code should be:
import xlwt
"""Reads robert.txt
This is the final script that writes by incrementing each row but maintain
one column"""
# Create workbook and worksheet
wbk = xlwt.Workbook()
sheet = wbk.add_sheet('python')
row = 0 # row counter
f = ope
"Gaurav Malhotra" wrote
I am beginner...
Welcome.
But when posting messages please start a new
thread do not use an existing one. Otherwise your
message is likely to be missed by anyone not
reading the previous subject.
I want to know best book to start with
when it
I know that the question has long been answered (and probably due today), but I
solved it and it was great exercise for me (as I'm not in college at the moment
and I need assignments like these to gauge my skills). I'll probably build a
gui
for it tomorrow, just so I can practice at that. I wis
Put the timing code for one itemt in a while loop and have the variable for
elapsed time incremented by the amount of time the fabricator has to cool
every time the modulus of the loop counter / 127 is 0 AND the count is above
0.
production = 0
time = 127 # seconds
timer = 0
rest = 313
run = input
HelloI have created the following code but would like the program to include two decimal places in the amounts displayed to the user. How can I add this?My code:# Ask user to enter purchase pricepurchasePrice = input ('Enter purchase amount and then press the enter key $')
# Tax ratesstateTaxRate =
List,
Background:
I'm on a linux based shared web host. They cater to PHP, not python.
(There's no third party python modules even installed!) So I installed
a virtual python in my home directory, plus easy_install and a bunch
of modules. Great!
The Problem:
Unfortunately, the web server uses the
On 3/4/11, lea-par...@bigpond.com wrote:
> Hello
>
> I have created the following code but would like the program to include two
> decimal places in the amounts displayed to the user. How can I add this?
>
> My code:
>
>
> # Ask user to enter purchase price
> purchasePrice = input ('Enter purchase
I ran the following code in python 2.6 and then in python 2.7 (using
calendar module) to manipulate dates and times
The following code works fine in Python 2.6 but throws up an error in Python
2.7. Can anyone please say why?
CODE:
import datetime
import calendar
while monday.weekday() != cal
Could you paste the whle code, because I get:
>>> import datetime
>>> import calendar
>>>
>>>
>>>
>>> while monday.weekday() != calendar.MONDAY:
...
File "", line 2
^
IndentationError: expected an indented block
>>> monday -= oneday
File "", line 1
monday -= oneday
^
Indentati
>>>
>>> while monday.weekday() != calendar.MONDAY:
... monday -= oneday
... oneweek = datetime.timedelta(days=7)
... nextweek = today + oneweek
... print "next week"
...
Traceback (most recent call last):
File "", line 1, in
NameError: name 'monday' is not defined
>>>
This means
Sorry David
The correctly indented code with the while loop is
while friday.weekday() != calendar.MONDAY:
MONDAY -= oneday
oneweek = datetime.timedelta(days=7)
nextweek = today + oneweek
nextyear = today.replace(year=today.year+1)
print "Today (year-month-day) =", today
print "Most r
Please consider this corrected example
The correctly indented code with the while loop is
while monday.weekday() != calendar.MONDAY:
MONDAY -= oneday
oneweek = datetime.timedelta(days=7)
nextweek = today + oneweek
nextyear = today.replace(year=today.year+1)
print "Today (year-month
14 matches
Mail list logo