Newbe: Python Exercise

Chris Keyes chrisk at nipltd.com
Thu Jan 16 16:41:10 EST 2003


Pavs

My understanding of concatenate is to join 2 strings together...

so "Hello" concatenated with "Pavs" would give "HelloPavs"

Your program works, not sure if the space should be inserted but I'm 
sure someone else will let you know that :-)

Hope that helps you...

I'm interested to know if anyone else has experience with "Learning to 
Program Using Python: A tutorial for hobbyiests, self-starters and all 
those who want to learn the art of computer programming" 0201709384

I've ordered but not received Core Python Programming, so hopefully 
thats worth a read, but not sure when I'll have time.

Python - Essential Reference (New Riders)is great once you get going, 
I've lived out of my copy and know many others do to, but not quite a 
beginners book. You'll probably want the Python 2.1 version, not the 
Python 1.52 edition which is often dirt cheap at discount shops.

Online I quite liked http://www.diveintopython.org

And lastly they guys here have been a great help so far, the community 
is probably the best bit of open sourse dev :-)

Have fun!

Chris

pavs wrote:
> # Write a program that gets 2 string variable and 2 integer variable for 
> the user,
> # concatenates(joins them together with no space) and displays the strings,
> # then multiplies the two numbers on a new line.
>  
> print
> print "Exercise:-"
> str1 = raw_input("Type First String: ")
> str2 = raw_input("Type Second String: ")
> num1 = input("The First Number: ")
> num2 = input("The Second Number: ")
> print "str1 & str2 =", str1, str2
> print "num1 * num2 =", num1*num2
>  
> --------------------
>  
> Hi, I want to know if this is what it meant, when it asked for 
> "Concatenate"? If not, isn't this another way to do it?
>  
> Also, I am currently reading the Book: "Non-programmers Tutorial For 
> Python" By, Josh Cogliati.
> Is there any other online book you guys would recommend?
>  
> Thanks,
> pavs
> 
>  
>  
> 
>  





More information about the Python-list mailing list