+ 1
How to input multiple variables
2 Answers
+ 5
For instance, in C we can do something like this:
// Reads two values in one line
scanf("%d %d", &x, &y)
One solution is to use raw_input() two times.
x, y = raw_input(), raw_input()
Another solution is to use split()
x, y = raw_input().split()
for more:
https://www.geeksforgeeks.org/input-multiple-values-user-one-line-JUMP_LINK__&&__python__&&__JUMP_LINK/
+ 2
I assume you're talking about how to enter your input in Code Playground.
When it prompts you to enter input, you separate each set of input with a new line. So put in the input for your first variable, hit enter, and then put in your next input. Repeat that process for as many inputs as your code asks for.
Best of luck! Btw, sometimes it's easier to practice on your local machine than from an online compiler. Less limitations.