python - Operations inside variables -


this question has answer here:

i want make python script finds maximum possible output using 2 operations. problem says there syntax error @ 2nd last line, in b in there. how can fix it?

x = 0 = int(input("1st number:"))  c = int(input("2nd number:" ))  e = int(input("3rd number:" )) in range(4):     if == 0:         b = "+"      elif == 1:          b = "-"     elif == 2:             b = "/"     else:         b = "*"      j in range(4):         if j == 0:             d = "+"          elif j == 1:              d = "-"          elif j == 2:                 d = "/"          else:             d = "*"          k = b c d e         print(k)  

if you're after variables e on single line, couldn't separate them commas , call print?

print a,b,c,d,e 

Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -