Take two integers A and B and write a program that outputs A×B. Output A×B on the first line.
a,b = input().split()
a = int(a)
b = int(b)
print(a*b)
I'm a beginner who solved question 10998. I wonder why the code applied here doesn't work in ide.
In the visual studio code, It says not enough values to unpack (expected 2, got 1) and an error appears once you enter it.
python
If you use the split
function without a factor, the string is divided by the default spacing. It's not written, but I think you probably entered two numbers separately.
You can enter it based on spacing (#1 value, #2 value,
), or you can enter it twice without using the split
© 2024 OneMinuteCode. All rights reserved.