Reputation: 1384
When I try to echo a number with an equals sign, this error happens:
printThis = "=" +str(result)
^
SyntaxError: invalid syntax
And I tried to do print("=" +str(result))
, it does a similar error.
Can anyone help? Thanks!
elif calc == "base":
base = int(input('''What base would you like to use?
Available: 2 (binary) 8 (octo) 10 (decimal (normal)) 16 (hex)
Type 2, 8, 10, or 16: '''))
if base == 2:
result = bin(input("Type the original number: ")
printThis = "=" +str(result)
print(printThis)
Upvotes: 0
Views: 902
Reputation: 88
close the bracket at the end for the below line in your code
result = bin(input("Type the original number: "))
Upvotes: 1