Commit b23ced3
Changed files (1)
projects
2
projects/2/prog2.py
@@ -5,3 +5,22 @@ Program author: mo khan
ID: 3431709
Program 2 - Using Input
""")
+
+# Read from stdin and assign value to a variable
+string1 = input("Input string 1? ")
+
+# Read from stdin and assign value to a variable
+string2 = input("Input string 2? ")
+
+# Read from stdin, convert to integer and assign value to a variable
+int1 = int(input("Input integer A? "))
+
+# Read from stdin, convert to integer and assign value to a variable
+int2 = int(input("Input integer B? "))
+
+print('')
+# Print the concatenation of string1 and string2
+print('{}{}'.format(string1, string2))
+
+# Print the result of multiplying int2 and int2
+print('{}'.format(int1 * int2))