Ask Question

What is the value of i printed? j = i = 1 i + = j + j * 5 print ("What is i?", i)

+2
Answers (1)
  1. 21 February, 09:13
    0
    7

    Explanation:

    Given the codes as follows:

    j = i = 1 i + = j + j * 5 print ("What is i?", i)

    In line 1, the value of 1 is assigned to variable i and then the variable i is assigned to variable j. This means j will hold the value of 1 as well.

    In line 2, j will be multiplied with 5 prior to the addition with j itself. So, j + j * 5 - > 1 + (1 * 5) - > 1 + 5 - > 6

    Next, value of 6 will be added with i. i = i + 6 - > i = 1 + 6 - > 7#

    Eventually, value of 7 will be printed out (Line 3).
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the value of i printed? j = i = 1 i + = j + j * 5 print ("What is i?", i) ...” 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