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!
Task 1: Product of Digits of a Number
Write a Python program to calculate the product of all digits in the given number.
If any digit is 0, ignore it in multiplication (to avoid zeroing out the product)
Task 2: Sum of Odd Numbers in the First N Terms of the Fibonacci Series
Write a Python program to generate the first n terms of the Fibonacci series.
From these terms, sum only the odd numbers and print the result.
Task 3: Check If Factorial of a Number is Even or Odd
Write a program that computes the factorial of a given number.
Then check if the factorial result is even or odd and print the output.
What will be the output of the following code?
Python Code
a = 15
b = 20
a = a + b
b = a - b
a = a - b
print(a, b)
What will the following code print?
Python Code
lst = [4, 7, 12, 18, 5]
count = 0
for item in lst:
if item > 10:
count += 1
print(count)