Computer Science, asked by muralivenkatasatish9, 2 months ago

Evaluate the expression given below if A = 30 and B=15.

A % B + A // B​

Answers

Answered by allysia
1

Answer:

2

Explanation:

A % B + A // B​ will be equivalent to 30%15 + 30//15

The priorities of operators in python are as followed:

  • ()
  • ^ or * *
  • /, // , %, *
  • +,-

Using that,

we solve it in the following order:

  • 30%15 + 30//15
  • 0+2
  • 2
Similar questions