blob: b8504cc68c7f9205a01b9d1748b77e2d734a885c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/bin/env python
print("""
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))
|