S
Python code without proper indentation is not very useful. You should try to put it inside a code block like this:
import time
import machine
from machine import Pin
tip_num = 0
tip = (Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP))
tip([1])
while tip !="":
tip_num += 1
tip_value = (tip)
total += tip_value
tip = (Pin('P10', mode=Pin.IN, pull=Pin.PULL_UP))
print("Counter", tip_num)
print("Done")
Apart from that there are a lot of mistakes (e.g. tip([1])) and redundancies (e.g. wrapping everything in parenthesis) in your code. You should probably read the the MicroPython and Pin documentation first.