216k views
0 votes
Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "second = ", followed by the value of second. Print everything on one line and go to a new line after printing. Assume that first has already been declared as a double and that second has been declared as an int. Assume also that the variables have already been given values.

1 Answer

2 votes

Answer:

print("first is "+str(first)+" second = "+str(second))

Step-by-step explanation:

The above written print statement is in python language.If first and second are strings then we need not to use str then we only have to write variable name.This statement prints the given in one line according to the question and it goes to new line after printing.

User Akash Shrivastava
by
6.2k points