python:
print('butts are' %s) % stupid
poopiscrap = 5
print('i like' poopiscrap)
I haven't really done python in a while, so....
Java:
int x = 10
int y = 10
System.out.printIn(x "is also" y)
Again, I haven't done Java in a LONG time.
neither of these will work
in python, string interpolation like that, with a %, isn't really used. even if it was, that's still not a valid way to do it
instead, you'd need to write
print('butts are {0}'.format(stupid)) and that of course assumes that
stupid is a real variable
the java one won't work because java requires a class with a
main method. you'd have to write this instead:
public class Whatever {
static void main(String[] args) {
int x = 10;
int y = 10;
System.out.println(x + " is also " + y);
}
}I don't think the stuff you had in the
println call would work either, but I don't have compiler on hand to check. it probably wouldn't though
also you have to have semicolons