Edzy
AI TutorResourcesToolsCompareBuy
SearchDownload AppLogin
Edzy

Edzy for Classes 6-12

Edzy is a personal AI tutor for CBSE and State Board students, with curriculum-aligned guidance, practice, revision, and study plans that adapt to each learner.

  • Email: always@edzy.ai
  • Phone: +91 96256 68472
  • WhatsApp: +91 96256 68472
  • Address: Sector 63, Gurgaon, Haryana

Follow Edzy

Browse by Class

  • CBSE Class 6
  • CBSE Class 7
  • CBSE Class 8
  • CBSE Class 9
  • CBSE Class 10
  • CBSE Class 11
  • CBSE Class 12
Explore the CBSE resource hub

Explore Edzy

  • Study Resources
  • Free Study Tools
  • Best Apps for Board Exams
  • Edzy vs ChatGPT
  • About Us
  • Why We Built Edzy
  • Blog
  • CBSE AI Tutor

Support & Legal

  • Help & FAQs
  • Accessibility
  • Privacy Policy
  • Terms & Conditions
  • Refund Policy
  • Cookie Policy
  • Site Directory

© 2026 Edzy. All rights reserved.

Curriculum-aligned learning paths for students in Classes 6-12.

FC
Question Practice

What does the following code segment return if the variables are num1 = 5 and num2 = 2? if num1 > num2: result = num1 - num2 else: result = num2 - num1

Attempt the question, check the explanation, and continue with similar questions to build confidence before exams.

MCQ_SA
CBSE
Class 11
Computer Science
Computer Science
Flow of Control
Question Bank

What does the following code s...

Single Answer MCQ
Q-00067662

What does the following code segment return if the variables are num1 = 5 and num2 = 2? if num1 > num2: result = num1 - num2 else: result = num2 - num1

1

3

2

-3

3

7

4

5

Previous QuestionNext Question

Video Explanation

Answer

Solution:

Watch Video Solution

Login to get access

Keep Practising

Students who asked this also explored

Continue with nearby questions to strengthen the same chapter concept while you still have the context fresh in mind.

Q1.

What is the primary purpose of the flow of control in a program?

Single Answer MCQ
View explanation
Q2.

Which control structure allows a program to make decisions?

Single Answer MCQ
View explanation
Q3.

In Python, which statement is used to implement branching?

Single Answer MCQ
View explanation
Q4.

What is the significance of indentation in Python?

Single Answer MCQ
View explanation