solve python
for i in range(1,10):
for j in range(1,i+1):
s = i*j
print('%d*%d='%i,j,s,end="\t")
print("\t")
for i in range(1,10):
for j in range(1,i+1):
s = i*j
print('%d*%d='%i,j,s,end="\t")
print("\t")
Type error: not enough arguments for format string
Once the parameters are enclosed in brackets (as shown below), the problem is solved
print('%d*%d='%(i,j),s,end="\t")
Summary
When there are multiple formatted outputs, the parameters after% should be enclosed in brackets
print(“%s : %s “%(x,y))
Similar Posts:
- Python TypeError: not all arguments converted during string formatting
- Python: why use it optimizer.zero_ grad()
- ValueError: day is out of range for month [How to Solve]
- ValueError: day is out of range for month [How to Solve]
- [Solved] java.lang.IllegalArgumentException: Cannot format given Object as a Date
- [IOS Development] Xcode console keeps printing ‘Status bar could not find cached time string image. Rendering in-process.’
- Python TypeError: ‘int’ object is not iterable
- [Solved] Java Call Error: java.lang.IllegalArgumentException: wrong number of arguments
- [Solved] Error: org.springframework.validation.BeanPropertyBindingResult
- TypeError: ‘list’ object cannot be interpreted as an integer