I'm trying to create a program that will multiply each digit with a number in the list in order
so lets say my inputted number is 1234
, then
1
will be multiplied by4
2
will be multiplied by8
3
will be multiplied by5
, and so on
frequentNum = input("please enter 4 digit frequent number: ")
arr = [4, 8, 5, 7]
for i in str(frequentNum):
for j in arr:
value = int(i) * j
print(value)
I tried this code but it multiplies each digit with every number in the list
I was trying to get an output of
4
16
15
28