Forwarded from PROGRAMMING VIP
Forwarded from PROGRAMMING VIP
❤2
for A2 members #code_challenge Median of Two Sorted list: Given two sorted lists nums1 and nums2, find the median of the entire sorted array.
for A2 def sum_squares(n)
sum = 0
for i in range(1, n + 1):
sum = i * i
return sum , what are the errors of the above code and what is the purpose
sum = 0
for i in range(1, n + 1):
sum = i * i
return sum , what are the errors of the above code and what is the purpose
def add(a, b):
return a + b
x = 5 y = 3 result = add(x, y) print(result) What is the output of the code?
return a + b
x = 5 y = 3 result = add(x, y) print(result) What is the output of the code?
Anonymous Quiz
2%
5
12%
53
8%
35
78%
8
def reverse_string(str1):
if len(str1) == 0:
return str1 else: return reverse_string(str1[1:]) + str1[0] str1 = "Hello" print(reverse_string(str1)) Use code with caution. Learn more What is the output of the code?
if len(str1) == 0:
return str1 else: return reverse_string(str1[1:]) + str1[0] str1 = "Hello" print(reverse_string(str1)) Use code with caution. Learn more What is the output of the code?
Anonymous Quiz
20%
hello
38%
olleh
9%
ohlle
33%
elloh
Forwarded from Leetcode with dani
A variable in Python is a named location in memory that stores a value or data.