Consider the following code snippet:
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
print(factorial(5))
What will be the output of the above code?
Consider the following code snippet:
def calculate_discount(price, discount):
discounted_price = price - (price * discount / 100)
return discounted_price
original_price = 1000
discounted_price = calculate_discount(original_price, 20)
if discounted_price < original_price:
print("You saved money!")
else:
print("No savings.")
What will be the output of the above code?
1 Crore+ students have signed up on EduRev. Have you? Download the App |
Which of the following is not a design strategy used in system design?
What is the primary purpose of input/output design in system design?
Which of the following is not a phase in the system testing process?
Which of the following is not a part of the implementation phase in system design?
What is the primary goal of system security and audit in system design?
Which of the following is not a key principle of the object-oriented approach in system design?
Which of the following is an example of a design pattern used in system design?
Which of the following is not a component of the system maintenance phase in system design?