Newbe: Python Exercise

pavs vze33v6m at verizon.net
Thu Jan 16 21:48:55 CET 2003


# 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





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20030116/29c5d2c4/attachment.html>


More information about the Python-list mailing list