Question PRG-PY-0023
EasyWhat is the output of this program?
print(7 // 2, 7 % 2)
- A.
3.5 1
- B.
3 0
- C.
Show answer and explanation
Answer: D
// is floor division (3) and % is the remainder (1).
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Python question
What is the output of this program?
print(7 // 2, 7 % 2)
3.5 1
3 0
Answer: D
// is floor division (3) and % is the remainder (1).
4 1
3 1