Ask Question

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.

+4
Answers (1)
  1. 20 October, 15:40
    0
    print ("first is "+str (first) + " second = "+str (second))

    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.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a single statement that will print the message "first is " followed by the value of first, and then a space, followed by "second = ", ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers