Here is the code with the while loop
import random
n = (random.randint(0,100))
g = int(input('Guess my number, 0 to 100, you have 10 chances'))
c = 0
while (c < 10):
g = int(input('Guess my number, 0 to 100, you have 10 chances'))
c = c + 1
if (g >= n):
print('Lower!')
On 29 Jan 2018, at 7:42, vinod bhaskaran wrote:
As the new character is adding the char in the new string but how is
it
getting reversed without any line giving the char number to be
traversed in
reverse order.
You don't need that, think about this example
newstring = ''
oldstring =
If I understand what you're asking you need to write the current
gameboard and the info you get in 'gameBoard' is the current state of
the game.
There are several ways of doing this (with different degrees of
cleverness) but to keep it simple:
Start by printing out the current state, different
Thanks for the suggestions
On Tue, Oct 7, 2014 at 3:10 AM, Alan Gauld alan.ga...@btinternet.com wrote:
On 06/10/14 23:08, Jan Erik Moström wrote:
I want to write a small script that scales photos. I want the scaled
photos to keep all meta data available in the originals. I also want
to keep
I want to write a small script that scales photos. I want the scaled
photos to keep all meta data available in the originals. I also want
to keep this python only and easily installed on linux and OS X
machines.
What library would you people recommend for doing this?
- jem
/posting-to-wordpress-with-python-and-metaweblog-api.html
(same as above)
Does anyone know if a library exists or some example of how to
do this?
jem
--
Jan Erik Moström, http://mostrom.eu
___
Tutor maillist - Tutor@python.org
http
/ /Library/WebServer/CGI-Executables/
this is from my Mac, on my debian machine it looks like this
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
And you can of course have different catalogs for different virtual domains
jem
--
Jan Erik Moström, www.mostrom.pp.se
Reply to [EMAIL PROTECTED] 07-04-17 07:26:
I've been reading the python tutorial trying to get used to the style
tryna understand it. So I come across this: sys.argv[0] in the tutorial
on python.org. What is sys.argv? How does it work? Can someone give me
a simple example on how to use it?
Reply to [EMAIL PROTECTED] 07-04-17 07:42:
How come it prints on -40 or -70.
Does -70 come from -70 - -100?
This is really confusing me.
I don't really understand your question, the definition of range
range(...)
range([start,] stop[, step]) - list of integers
Return a list
Reply to Dave Kuhlman [EMAIL PROTECTED] 07-01-06 15:26:
It's sort of hidden, but note the restriction to string values in
the docs on the set method:
set(section, option, value)
If the given section exists, set the given option to the specified
value; otherwise raise NoSectionError. While it is
I'm trying to use ConfigParser for the first time and I'm
missing something. I have this code
import ConfigParser
import datetime
conf = ConfigParser.ConfigParser()
conf.add_section('general')
conf.set( 'general', 'revision', 0 )
conf.set( 'general', 'date',
it is not as convenient as Windows?
Do you mean that you needed to compile Python ... well, you should have
downloaded the binary distribution instead.
jem
--
Jan Erik Moström, www.mostrom.pp.se
___
Tutor maillist - Tutor@python.org
http
Shi Mu [EMAIL PROTECTED] 2005-10-24 09:13:
why the order is changed?
By definition a dictionary has no order.
jem
--
Jan Erik Moström, www.mostrom.pp.se
___
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo
13 matches
Mail list logo