On 12 Feb 2012 15:28, "William Stewart" <[email protected]> wrote:
>
> I am trying to get 2 string variables and 2 integer variables to be able
to be multiplied
> can anyone tell me what I did wrong
>
> str1 = raw_input("Type in a String: ")
> str2 = raw_input("Type in a String: ")
> int1 = raw_input("Type in a integer variable: ")
> int2 = raw_input("Type in a integer variable: ")
> print str1 + str2 + int1 + int2
> import math
> print str1, "*", str2, "*", int1, "*"int2 "=", str1, * str2, * int1 *
int 2
>
>
>
> and it wont let me write int2
> I know this may look stupid to most people but I am just new at this so
dont laugh :)
>
Hi,
It is a bit unclear what you mean by "it wont let me write int2".
Try running this function and see if it helps:
def test():
data = raw_input("give me an integer")
print type(data)
print "a string" * "another"
Best,
Brian vdB
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor