Hi all,Does anyone know how to make Python calculate square
roots?
Thanks,
Nathan Pinnohttp://www.npinnowebsite.ca/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
I saw that great idea from Steven, and I appreciate it. I think it will
work. Just need to figure out how to get 4 numbers from the player on one line
for easy comparison, e.g. telling whether the number is correct position and
number, incorrect position and correct number, or both are incorr
Hi all,
Is there a way to combine a request for numbers and letters (e.g. user id
and passwords)?
Thanks,
Nathan Pinnohttp://www.npinnowebsite.ca/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Sorry,
Just remembered that strings can include both letters and numbers. Case
closed.
Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp://www.npinnowebsite.ca/
- Original Message -
From:
Nathan
Pinno
To: tutor@python.org
What's wrong with this code? I'm using 2.2.3 if this helps.
#This is for a password protected program to store passwords.
password = "hello"print "The Password Program"print "Copywrite
2005. All Rights Reserved."printanswer = raw_input("What is the
password? ")while password !=
t;,x," \tID: ",numbers[x]," \tPassword:
",numbers[x]
print
menu_choice = input("Choose an option: ")
elif menu_choice == 5:
filename = raw_input("Filename to save: ")
save_login(list,filename)
menu_choice = input("C
ad a file?
Here's the latest code:
# This is the code for a password protected program to store
passwords.password = "hello"print "The Password Program"print
"Copyright 2005 Nathan Pinno."printanswer = raw_input("What is the
password? ")while passwo
Thanks Wolfram for help with that error.
Here's another that popped up:
Traceback (most recent call last):
File "D:\password.py", line 68, in ?
for x in site.keys():
AttributeError: 'str' object has no attribute 'keys'
How t
error showing up? (Original Message:
(Tutor) What's wrong with this code?) Ignore previous post.
> Hi!
>
>
> on Thu, 7 Jul 2005 01:13:48 -0600 "Nathan Pinno"
<[EMAIL PROTECTED]> wrote :
>
------
Hi all,
Why does invalid syntax popup?
Here is the latest code:
# This is the code for a password protected program to store
passwords.password = "hello"print "The Password Program"print
"Copyright 2005 Nathan Pinno."printanswer = raw_
Here is the error:
File "D:\password.py", line 45
site = raw_input("Site: ")
^
SyntaxError: invalid syntax
HTH,
Nathan Pinno
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[E
Here is another error message:
Traceback (most recent call last):
File "D:\password.py", line 69, in ?
main_menu()
NameError: name 'main_menu' is not defined
Thanks.
- Original Message -----
From: "Nathan Pinno" <[EMAIL PROTECTED]>
Here is the latest code, in case you need it:
# This is the code for a password protected program to store passwords.
password = "hello"
print "The Password Program"
print "Copyright 2005 Nathan Pinno."
print
answer = raw_input("What is the pass
Thanks, Danny and all.
Adjusted the code, here is the newest code and error:
# This is the code for a password protected program to store passwords.
password = "hello"
print "The Password Program"
print "Copyright 2005 Nathan Pinno."
print
answer = r
one is interested in finishing it, just give
me a shout, and I'll send it to you as a ZIP file.
Thanks,
Nathan Pinno
Crew, McDonalds Restaurant, Camrose, AB, Canada
http://www.npinnowebsite.ca
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Brian va
Hi all,
I was just wondering if it is possible to use Python as a language to
password protect a webpage? If it is possible, I wouldn't mind learning how, it
would enable me to add a member-only section to my website.
Thanks,
Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp:/
What's the invalid syntax?
Here's the code (Part of my Guess the Numbers game):
if a0 == x0 and a1 == x1 and a2
== x2 and a3 ==
x3: print
"Congratulations! Way to
go?"
answer = raw input("Play again: (Y)es or (N)o Type the letter of your choice.
")
Thank
Could you send me the code if possible, or show me the way to go?
- Original Message -
From: "nephish" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Sent: Saturday, July 09, 2005 12:32 PM
Subject: Re: [Tutor] Is it possible to...
Hi all,
Is the subject possible without getting an error?
Nathan PinnoCrew, McDonalds Restaurant, Camrose, AB Canadahttp://www.npinnowebsite.ca/
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
t make the code easier to read, but harder to code
because I have to keep going to the top to read the menu. Not that fun,
but
necessary for a smooth program, I guess.
Nathan Pinno
- Original Message -
From: "Brian van den Broek" <[EMAIL PROTECTED]>
To: &
Also, I just wanted to know because I'm using it in my Giant Computer
program for the menus, so I don't have to keep re-typing them.
Nathan Pinno
- Original Message -
From: "Brian van den Broek" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EM
Brian,
I'll do one better and post the code after I'm done writing it. Then you
can decide for yourself what I'm trying to do.
Nathan P.
- Original Message -
From: "Brian van den Broek" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMA
Here is the error message:
Traceback (most recent call last): File "D:\GC.py", line 67, in
? if option == 1:NameError: name 'option' is not
defined
And the relevant code:
print "The Giant Calculator"printprint "Copyright 2005 Written and
debugged by
uot;4) Convert Celsius to
Kelvins" print "5) Convert Kelvins to
Fahrenheit" print "6) Convert Fahrenheit to
Kelvins" print "7) Main Menu"
temp_option = input("Choice: ")
def formula_menu(): print "1)
Interest" print &quo
I fixed this bug by myself, I had forgotten to add a print on a line by
itself.
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, July 10, 2005 12:29 AM
Subject: Re: [
t make the code easier to read, but harder to
code
because I have to keep going to the top to read the menu. Not that fun,
but
necessary for a smooth program, I guess.
Nathan Pinno
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On
rror?
Nathan
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sent: Sunday, July 10, 2005 2:16 AM
Subject: Re: [Tutor] What's going on with this code? Error message
supplied.
> Nath
Hey all,
Thought I'd try a mini-calc. Here's the code:
# This is a small calculator.print "Mini Calculator"print "By
Nathan Pinno"printprint "CALCULATE MENU"print "1) Add"print
"2) Subraction"print "3) Mult
Thanks to all in the group. Mini_calc is now up and running successfully
and is now available to download from my site.
Thanks again,
Nathan
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sen
It runs but now how do I make it go back to the previous menu (e.g. from
Add to Calculate Menu?)
Here is the latest screenshot:
The Giant Calculator
Copyright 2005 Written and debugged by Nathan Pinno
OPTIONS MENU1) Calculate2) Shapes3) Temperature4)
Formulas5) QuitWhat option would
Hey all,
Just finished shape_calc.py. If anyone is interested in going through the
code, before I send it to my website, let me know. If no one answers this within
a week, I post the zip file on my site.
Nathan Pinno.
___
Tutor maillist
Luke and all,
Shape_calc helps you to find the area, perimeter, and other
info about shapes.
Simple enough.
- Original Message -
From:
luke
To: Nathan Pinno
Sent: Sunday, July 17, 2005 9:42
PM
Subject: Re: [Tutor] Just finished
Hey all,
The subject says it all. If anyone is interested in working on Giant
Calculator, give me a shout, and I'll send you a ZIP file with the PY
file.
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tuto
Terry and all,
I thought something like this might popup.
I find it easier to remember and faster to code than int(raw_input()). The
faster I can code a program, the better in my opinion. So what if it has a
few bugs, I fix them gradually.
Nathan Pinno
- Original Message
example. If there is, show me it, please. I'm getting confused writing
my MasterMind and don't want to screw up bad, e.g. repeat the same answer in
a different way.
Thanks,
Nathan Pinno.
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
Raj,
Shape_calc is a calculator for finding information about shapes, e.g.
perimeter, area, and so forth.
HTH (Hope This Helps),
Nathan Pinno
- Original Message -
From:
Raj
Moodley
To: [EMAIL PROTECTED]
Sent: Monday, July 18, 2005 2:54
on a MasterMind-like game,
but it giving me headaches :).
Nathan Pinno.
P.S. Enjoy the shape_calc. You can find Mini_calc and Guess the Number on
my site at this address: http://www.npinnowebsite.ca/download.htm.
- Original Message -
From:
Raj
Moodley
Hi all,
The subject line says it all. What's the answer?
Let's let everyone talk about this.
Nathan Pinno.
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
hat I don't miss any.
Nathan Pinno
- Original Message -
From:
luke
To: Nathan Pinno
Sent: Monday, July 18, 2005 11:44
AM
Subject: Re: [Tutor] Which is safer and
easier to code,raw_input or int(raw_input))?
tmp = raw_input("hello,
ifications I have made to your code if you're
> interested. Don't mean to correct you or to stole your app, only
suggestions
> and ideas
>
> Best Regards to you
>
> Alberto
>
>>From: "Nathan Pinno" <[EMAIL PROTECTED]>
>>To: &
Thanks all for helping me. Thanks to the group, I have figured out a way to
make Giant Calculator and any program repeat until the user wants to exit.
Thanks again,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman
How do I make Python draw a shape? e.g. a triangle Is there a specific
module that I have to call, or what is the command(s)?
Thanks,
Nathan Pinno
P.S. Knowing this will help me make my shape_calc program
better.
___
Tutor maillist - Tutor
for the help,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Luis and all,
I want to more than matching, I am trying to find all the available combos,
e.g a1 == x1 or a1 == x2 or a1 != x1.
HTH,
Nathan Pinno
I also noticed you forgot the a[1] == b[1]. (grin) :)
- Original Message -
From:
Luis N
To: tutor@python.org
Sent
Thanks. Will ask if I have any more questions. Maybe I won't have to go to
Visual Basic to write my games. Maybe Python will do the trick.
Thanks again.
Nathan Pinno
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAI
ot defined
Thanks in advance,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Luke,
Thanks for the reminder. Though I might try Java, but having problems with
errors left, right and center.
G2G,
Nathan
- Original Message -
From: "luke" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo"
<[EMAIL PR
Pygame looks solid. I'm sold on it. Maybe I'll be able to code my Guess the
Number Sequence Game with it using Python.
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, July 27
I first posted my question in this post, but no one seemed to answer me.
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Danny Yoo" <[EMAIL PROTECTED]>
Cc: ; "Terry Reedy" <[EMAIL PROTECTED]>
Sent: Monday, July 18,
stb: print item,other
Thanks in advance,
Nathan Pinno
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Here's part of what I'm looking for (got it from a Python program):
a b
a 2
a 5
a 6
1 b
1 2
1 5
1 6
3 b
3 2
3 5
3 6
4 b
4 2
4 5
4 6
I want to see also !=, ==, and, & nor combos also. 0 != 2 for an example.
- Original Message -
From: "Danny Yoo" <[EMAIL PR
Thanks. Now it basically works. Now I just have to improve it.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sent: Wednesday, July 27, 2005 6:06 PM
Subject: Re: [Tutor] I'm stumped.
> Try t
Now that's worth the mention of VB. Glad I have Python, or many of my ideas
would stay in my head...hehehe
- Original Message -
From: "luke" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Tutor"
Sent: Wednesday, July 27, 2005 6:28 PM
Subject: Re: [Tutor] OT: we won't eat VB programmers fo
It works. The program will be found on my webpage at it's new address
http://falcon3166.tripod.com in the Downloads page.
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Alan G" <[EMAIL PROTECTED]>;
Sent: Wednesday, July 27,
I got it Alan. It was good. Thanks.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor"
Sent: Thursday, July 28, 2005 4:15 AM
Subject: Re: [Tutor] OT: we won't eat VB programmers for lu
Hi all,
I'll be brief. I always get a blank line whenever I run my Python programs
that I've coded. How can I get rid of it. It's kind of annoying to press the
spacebar in order to return to >>> in IDLE or the C:\ prompt in
DOS.
Thanks,
Nathan
_
I meant the return key, not the spacebar. Sorry for the mix-up.
- Original Message -
From:
Nathan
Pinno
To: tutor@python.org
Sent: Saturday, July 30, 2005 3:50
PM
Subject: [Tutor] How do I get rid of
blank space when running a program I'vecoded?
H
Here's the message:
File "D:\Python22\prog4.py", line 19 while
option != 9: ^SyntaxError:
invalid syntax
And the code:
#This program finds the area and perimeter of circles, rectangles, and
squares.def menu(): print '1) Area
(Circle)' print '2) Area
(Rectangle)' print '
; (Once
> you have it working).
>
> Happy Debugging
>
> --Todd
>
>
> On Saturday 30 July 2005 06:19 pm, Nathan Pinno wrote:
>> Here's the message:
>> File "D:\Python22\prog4.py", line 19
>> while option != 9:
>> ^
>> S
Hi all,
How do I make a program keep repeating until the user is done with
it?
Thanks,
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
When I run the following code it just keeps repeating. Here is a screen
shot showing what I mean:
Mini CalculatorBy Nathan Pinno
CALCULATE MENU1) Add2) Subraction3) Multiplication4)
Division w/o remainder5) Division with remaider6) Exponation7)
Square roots9) ExitOption: 5First number
loop again.
>
> Another comment - the global cal_opt is considered evil by many. Better
> would
> be:
>
> def cal():
> return int(raw_input("Option: "))
>
> print "Mini Calculator"
> print "By Nathan Pinno"
> print
>
>
Here is another screen shot:
Mini Calculator
By Nathan Pinno
CALCULATE MENU
1) Add
2) Subraction
3) Multiplication
4) Division w/o remainder
5) Division with remaider
6) Exponation
7) Square roots
9) Exit
Option: 3
First number:4
Second number:6
4 * 6 = 24
CALCULATE MENU
1) Add
2) Subraction
3
hat you want to run by double-clicking them but you can take it
> out if you find it annoying.
>
> Kent
>
> Nathan Pinno wrote:
>> I meant the return key, not the spacebar. Sorry for the mix-up.
>>
>> - Original Message -
>> *From:* Nathan Pi
Glad I didn't put up my mini calculator apps on my site. Would have had
complaints from people. But this thread has given me ideas on how to fix
them all, and how to fix Giant Calculator as well.
- Original Message -
From: "Reed L. O'Brien" <[EMAIL PROTECTED]>
If anyone will help me learn file I/O, it would be appreciated. I went
through Josh Cogliani's Non-Programmer's Tutorial for Python, and I still can't
understand it.
Thanks in advance,
Nathan Pinno
___
Tutor maillist - Tutor@
This is an easy one. Go to the IDLE, I
found it was easier. The latest Python refused to work on mine, so I'm using
2.2.3, and it works fine.
- Original Message -
From:
[EMAIL PROTECTED]
To: tutor@python.org
Sent: Friday, July 29, 2005 10:22
PM
Subject: [Tutor] cant g
Well, you saw my password program. That was my first attempt at using file
I/O. Thought I'd try it big time. You saw where that went.
Nathan
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Cc:
Sent: S
I'd post another code, but I've already figured it out, thanks to help on
the mini calc program.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sent: Sunday, July 31, 2005 2:03 AM
Subject: Re: [
Here's my work. I call it filewriter.
The code:
file = raw_input("File name please: ")
f = file(file, "r")
for line in f.readlines():
print line
f.close()
Will it do the trick?
Nathan
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]
understand.
----- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Danny Yoo" <[EMAIL PROTECTED]>
Cc:
Sent: Sunday, July 31, 2005 2:29 PM
Subject: Re: [Tutor] Help with file I/O.
> Here's my work. I call it filewriter.
> The code:
> file
Here's the improved version.
file = raw_input("File name please: ")
f = open(file)
for line in f.readlines():
print line
f.close()
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Danny Yoo" <[EMAIL PROTECTED]>
Cc:
Okay I understand how to open and read to a file, but how do I write to a
file, e.g. a list.
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Danny Yoo"
<[EMAIL PROTECTED]>
Cc:
Sent: S
Thank you to all. All my calculators run perfect. I can now make a perfect
Giant Calculator as well.
Thanks again,
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
The Giant Calculator is perfect also!
- Original Message -
From:
Nathan
Pinno
To: tutor@python.org
Sent: Sunday, July 31, 2005 3:34 PM
Subject: [Tutor] Thanks to all!
Thank you to all. All my calculators run perfect. I can now make a
perfect Giant Calculator
write the main part of a password
program, then when that's solid, I'll add the file I/O. Maybe I'll try the
exercise where I have to add file I/O to a grades program, in the
Non-Programmer's Tutorial for Python.
- Original Message -
From: "luke" <[EMAIL PROT
ct: Re: [Tutor] Thanks to all!
>
> Congratulations! So what are you going to try next?
>
> --Todd
>
> On Sunday 31 July 2005 06:27 pm, Nathan Pinno wrote:
>> The Giant Calculator is perfect also!
>> - Original Message -
>> From: Nathan Pinno
>>
What the invalid syntax? Here is the error message:
SyntaxError: invalid syntax File "D:/Python22/grades.py", line
66 which =
which-1 ^SyntaxError: invalid
syntax
Here is the code:
max_points = [25,25,50,25,100]assignments = ['hw ch 1','hw ch
2','quiz ','hw ch 3','test']stud
Take a look at the line before the one you are getting the error on.
> And count the ('s and the )'s.
>
> --Todd
>
>
>
> On Sunday 31 July 2005 07:38 pm, Nathan Pinno wrote:
>> What the invalid syntax? Here is the error message:
>> SyntaxError: invalid synt
Thanks again Luke.
- Original Message -
From: "luke" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sent: Sunday, July 31, 2005 5:50 PM
Subject: Re: [Tutor] What's the invaild syntax? Error message and relative
codesupplied.
>
Does it display stars instead?
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Alberto Troiano"
<[EMAIL PROTECTED]>; "Danny Yoo" <[EMAIL PROTECTED]>; "luke"
<[E
Hey, looks like this is my problem. ) I'll just have to be more careful in
the future.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>;
Sent: Sunday, July 31, 2005 6:24 PM
Subject: Re: [Tutor] What
Is input a Python function or command? I need to know because I'm planning
to use it as a variable, and don't want to get an error.
Thanks,
Nathan
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor
Thanks Luke. Saved me quite a headache. I will use in_file instead. Makes
more sense anyway.
- Original Message -
From: "luke p" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>
Sent: Sunday, July 31, 2005 7:59 PM
Subject: Re: [Tutor] Is in
Just remembered that input is for integers! Oops! Shouldn't have asked! And
in_file makes more sense because I'm loading a file with it.
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Luke P" <[EMAIL PROTECTED]>
Cc: "Tut
grade
elif which !=
-1:
print "Invalid Grade
Number"
else:
print "Student not found" elif menu_choice ==
5: filename = raw_input("Filename
to load: ")
load_grades(students,filenam
Maybe I should use assignments instead?
- Original Message -
From:
Adam Bark
To: Nathan Pinno
Cc: tutor@python.org
Sent: Monday, August 01, 2005 2:47
PM
Subject: Re: [Tutor] I've run into a jam
on the exercise on file I/O
>>> max_points = [2
Hi all,
Just curious to wonder if Python can be used to write a program to check an
HTTP mail server for mail, and check more than one server, even if they are
using different proxies, i.e. HTTP for one and SMTP for the other.
Thanks,
Nathan Pinno,Crew, Camrose McDonalds and owner
What if I were to use ID's for the students and use the ID's as the sequence
index, and link the students and their grades to the IDs?
Just a suggestion,
Nathan Pinno
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: "Nathan Pinno" &
Hey all,
I want to write a program that will convert time in any
other time zone to my time zone. Would it be better to use the
Python time molecule or just a whole bunch of if statements?
Waiting eagerly for an answer,
Nathan Pinno,Crew, Camrose McDonalds and owner/operator of
Woffee
Hi all,
I had a co-worker say to me at work that Python was related to or based
upon BASIC. Is this true, and if not, how can I tell my friend why they are
similar?
Nathan Pinno,Crew, Camrose McDonalds and owner/operator of
Woffee
BEGIN:VCARD
VERSION:2.1
N:Pinno;Nathan;Paul;Mr.
FN:Pinno
Thanks Bob and Liam. I was wondering myself.
- Original Message -
From:
Bob
Gailer
To: Nathan Pinno ; Tutor mailing list
Sent: Monday, August 01, 2005 11:09
PM
Subject: Re: [Tutor] Question about BASIC
and Python
At 06:13 PM 8/1/2005, Nathan Pinno wrote
I forgot to tell that I use Python 2.2.3. When I first got Python, I got
2.4.1, but it refused to run the second time. So I went and got 2.2.3. Your
answer would make sense if I had 2.4.1, but I don't.
- Original Message -
From: "Danny Yoo" <[EMAIL PROTECTED]>
To: &
I think I'll leave this one for someone else. I got too confused too quick.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list"
Sent: Tuesday, August 02, 2005 1:47 AM
Sub
I am writing a Blackjack program, and was wondering how to reset the values
to zero, e.g. cash = 0?
Thanks,
Nathan Pinno,Crew, Camrose McDonalds and owner/operator of
Woffee
BEGIN:VCARD
VERSION:2.1
N:Pinno;Nathan;Paul;Mr.
FN:Pinno, Nathan Paul
ORG:Woffee;Executive
TITLE:Owner/operator
TEL
I am now using Python 2.4.1, but decided to abandon it. It got too confusing
too fast. I'm better off writing simple games and apps for now.
- Original Message -
From: "Nathan Pinno" <[EMAIL PROTECTED]>
To: "Danny Yoo" <[EMAIL PROTECTED]>
Cc: "
Never mind all. I was just being stupid as usual. I thought that there might
be a Python command for resetting and wanted to find out if that was the
case.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]&
is the right and correct way
to go? Also for blackjack, I want to use it as playertotal = playertotal + n,
and computertotal = computertotal + n. or 1,2,3, etc. Which is better?
Thanks,
Nathan Pinno,Crew, Camrose McDonalds and owner/operator of
Woffee
BEGIN:VCARD
VERSION:2.1
N:Pinno;Nathan
igured out separately.
The two games are indeed separate, too much trouble to do them a 1 program
that can play both games.
Maybe I should have shown my code and asked using the code as a visual
reference.
- Original Message -
From: "Alan G" <[EMAIL PROTECTED]>
To: "
aw_input("Menu choice:
"))
def card_choice(): return
random.choice(range(1,14)
def types(): return random.choice(range(1,5)
def player_cards(): print a," of
",t1 print b," of ",t2
print "Blackjack"print "By Nathan Pinno"while
1:
1 - 100 of 216 matches
Mail list logo