subject

I'm struggling to get my def command to work, I've tried changing the code in it, but nothing seems to be helping. Could someone help? The actual code should print out like 2 different charts, but without the def I don't believe it will work.

balance = ['1100111010101100', '1101001010011100', '1100111001011100',
'1100100001011100', '1000101101011100', '1110100101011100',
'1110000101011000', '1001110101011101', '0101111011011101',
'1011110101011101']

name = ['Johnny A.', 'Janney B.', 'Joweey C.', 'Jiminny D', 'Carol E.', 'Jeffry F.',
'Jenny G.', 'Robert H.', 'Herman I.', 'Bachman J.']

account = ['CD21', '2A31', 'D1A1', 'A1AD', 'CCC3', 'FB24', 'DF21', 'E3C4',
'B3C4', 'A3C4']

xRate = 3144.02

def binaryToDecimal(n):
return int(n,2)

def hexToDecimal(n):
return int(n, 0)

#Original Account Summary
def originalAccount_summary():
for i in range (len(names[i])):
print("# " + str(hexToDecimal(account[i]) + "\t" + names[i] + "\t" + (binaryToDecimal(balance[i])))

#Current Account Summary
def currentAccount_summary()
for i in range(len(name[i])):
balance. append((binaryToDecimal(balance[i]) * xRate)
originalAccount_summary()

#Main
originalAccount_summary()
xRate = float(input("Enter current rate of exchange BitCoin to US Dollar: $ "))
currentAccount_summary()

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 16:00
An english teacher would like to divide 8 boys and 10 girls into groups, each with the same combination of boys and girls and nobody left out. what is the greatest number of groups that can be formed?
Answers: 2
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 24.06.2019 02:10
Aspeed limit sign that says "night" indicates the legal speed between sunset and sunrise.
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Anewly established internet company with 40 employees needs your advice. they are looking for a collaboration tool and have narrowed their choices to gotomeeting, webex, and my web conferences. after reading the information presented in this chapter and other sources, prepare a two- page document ( double spaced) that includes two advantages and two disadvantages of each tool. which one is your final recommendation? why did you choose that tool over the other two?
Answers: 3
You know the right answer?
I'm struggling to get my def command to work, I've tried changing the code in it, but nothing seems...
Questions
question
Mathematics, 10.02.2021 20:10
question
History, 10.02.2021 20:10
question
Mathematics, 10.02.2021 20:10
Questions on the website: 13722361