logo

Crowdly

Browser

Add to Chrome

Batch-01_BSc_Semester-01_Algorithmic Thinking and its Applications

Looking for Batch-01_BSc_Semester-01_Algorithmic Thinking and its Applications test answers and solutions? Browse our comprehensive collection of verified answers for Batch-01_BSc_Semester-01_Algorithmic Thinking and its Applications at iitjbsc.futurense.com.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

What is the primary purpose of an accumulator in loops?
0%
0%
0%
0%
View this question
What is the output of dividing two equal integers?
0%
0%
100%
0%
View this question
What happens if you write if A = B instead of if A == B?
0%
0%
0%
0%
View this question
What does the in keyword do in a for loop?
0%
0%
0%
0%
View this question
In the statement for x in A:, what does x represent?
0%
0%
0%
0%
View this question

Assignment: Conditional Logic and Loops in Python

🎯 Learning Objectives:

  • Implement conditional branching (if, elif, else) using Boolean expressions and logical operators.

  • Safely handle input and typecasting.

  • Use loops to iterate through lists and apply the accumulator pattern.

  • Understand the role of indexes in list-based iteration.

Certainly! Below are the modified tasks with a different scenario while retaining the core concepts like conditional checks, user input, and handling division by zero for Task 1, and income-based calculations for Task 2.

✅ Task 1: Weather and Wind Speed Comparison

Write a Python program that:

  • Accepts two values: the temperature (temp) in Celsius and wind speed (wind_speed) in km/h from the user.

  • Checks:

    • If the temperature is equal to the wind speed → print "Temperature and wind speed are the same."

    • If not equal, print which one is greater (temperature or wind speed).

    • If the temperature and wind speed are not equal, print the quotient and remainder when dividing the larger value by the smaller one.

    • Handle division by zero if the wind speed is zero (i.e., avoid division by zero errors).

✅ Task 2: Discount Calculator (Based on Purchase Amount)

Write a Python program that:

  • Takes input of a user’s total purchase amount (as an integer).

  • Based on the purchase amount, calculate the discount:

    • ₹1,000 to ₹4,999 → 5% discount

    • ₹5,000 to ₹9,999 → 10% discount

    • ₹10,000 to ₹49,999 → 15% discount

    • ₹50,000 and above → 20% discount

  • Print:

    • Purchase Amount: ₹

    • Applicable Discount Rate: %

    • Discount Amount: ₹<calculated_discount>

    • Final Amount After Discount: ₹<final_amount>

View this question
Which of the following is an invalid example of a conditional expression in Python?
100%
0%
0%
0%
View this question
Which loop construct is introduced as the most commonly used in Python?
0%
100%
0%
0%
View this question
Which of the following is NOT a valid way missing data might appear in a dataset?
0%
0%
0%
0%
View this question
Which operator is used in Python to check inequality between two variables?
0%
0%
100%
0%
View this question

Want instant access to all verified answers on iitjbsc.futurense.com?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome