QuestionQ28Verified/Control Flow – Conditional Blocks and LoopsCopy linkReport a problemAsk AstroTutorSave questionWhat output does the following code produce? x = 4.5 y = 2 print(x // y) A2.5B2C2.25D2.0Show AnswerAnswerExplanationPython’s // operator applies floor division. 4.5 / 2 is 2.25, whose floor is 2; because the operation involves a float, the result is a float, so it prints as 2.0.Learn morePython Language Reference — ExpressionsShow comments1Show commentsCommunity DiscussionNo comments yet. Be the first to start the discussion!
Community Discussion