Commit b23ced3

mo khan <mo@mokhan.ca>
2025-01-10 22:23:33
Complete program 2 for project 2
1 parent e3f6747
Changed files (1)
projects
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))