def callon(b=20, a=10):
b = b + a
a = b - a
print(b, "#", a)
return b
x = 100
y = 200
x = callon(x, y)
print(x, "@", y)
y = callon(y)
print(x, "@", y)
# Step-by-step execution:
# 1. Initially, x = 100 and y = 200.
# 2. First function call: callon(100, 200)
# b = 100 + 200 = 300
# a = 300 - 200 = 100
# Output: 300 # 100
# Return value: 300
# x is updated to 300.
# 3. print(x, "@", y)
# Output: 300 @ 200
# 4. Second function call: callon(200)
# b = 200 + 10 = 210
# a = 210 - 10 = 200
# Output: 210 # 200
# Return value: 210
# y is updated to 210.
# 5. print(x, "@", y)
# Output: 300 @ 210
# Final Output:
300 # 100
300 @ 200
210 # 200
300 @ 210
Explanation:
The function callon takes two arguments b and a, with default values b=20 and a=10.
Inside the function:
- b is updated as b = b + a.
- a is updated as a = b - a.
- The function prints the values of b and a, separated by "#".
- Finally, the updated value of b is returned.
The first function call updates x, while the second function call updates y.
The final output is generated based on the updated values of x and y.
The SELECT statement when combined with \(\_\_\_\_\_\_\) clause, returns records without repetition.
print(16 * 5 / 4 * 2 / 5 - 8)
myStr[:4] extracts the first 4 characters, which are "MISS".myStr[-5:] extracts the last 5 characters, which are "SIPPI"."#" in between, resulting in "MISS#SIPPI".In SQL, the aggregate function which will display the cardinality of the table is \(\_\_\_\_\_\).
myStr[:4] extracts the first 4 characters, which are "MISS".myStr[-5:] extracts the last 5 characters, which are "SIPPI"."#" in between, resulting in "MISS#SIPPI".
event = "G20 Presidency@2023"
L = event.split(' ')
print(L[::-2])