Computers and Technology, 25.02.2021 20:30 mutesheep
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()
Answers: 1
Computers and Technology, 22.06.2019 01:30, chastineondre7979
How will you cite information that is common knowledge in your research paper?
Answers: 1
Computers and Technology, 23.06.2019 05:00, mikeysoulemison
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
Computers and Technology, 23.06.2019 13:30, gamingisfun
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
I'm struggling to get my def command to work, I've tried changing the code in it, but nothing seems...
English, 07.10.2020 07:01
History, 07.10.2020 07:01
Mathematics, 07.10.2020 07:01
Social Studies, 07.10.2020 07:01