Re: simple game in python?

In any programming language you have different kinds of variable. A variable is as you know just data stored in memory that you access with the name assigned to it.

When you are attempting to add strings together, you are literally adding the text of one string to the end of another.

Python can't let you add data of differing types together. The way each datatype is implement is vastly different.


The str function simply converts data to the string format data. The print statement simply takes a string and prints it.

print "Please enter a number between " + str(min) + " and " + str(max) + "."


steps:
print operation detected
String assigned
Text added to the string, Please enter a number between
adding to string
string function
integer data, converts minimum number to string
appends the now string output to the print string

URL: http://forum.audiogames.net/viewtopic.php?pid=163481#p163481

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
http://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • [Audiogames-re... AudioGames.net Forum — General Game Discussion: dhruv
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: camlorn
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: Guitarman
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: camlorn
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: dhruv
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: camlorn
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: dhruv
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: stewie
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: stewie
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: dhruv
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: camlorn
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: dhruv
    • Re: [Audi... AudioGames.net Forum — General Game Discussion: camlorn

Reply via email to