Quiz answers | Sololearn: Learn to code for FREE!


Quiz answers

I think all of us already tried the quiz section out. But if you look closer, there is no answer section where the user is able to see how the right answer should look like. It would be awesome if sololearn invite the right answer section:D So now, what's your opinion about the quizes? Have a great day guys!!! ;D

6/16/2017 7:01:01 PM


11 Answers

New Answer


there is but it's a little hidden https://code.sololearn.com/W5UBa2UjGztc/?ref=app


yes, I do agree. There should be some sort of answer list too along with the explanation so that the one can understand how the solution has come and what is the concept behind it.


how to answer the code


am new here help


What is the function of the new int; expression?



Fill in the blanks to add "my.svg" to the page:


Fill in the blanks to use a conditional expression to assign 8 to y if x is greater or equal to 5: If x is less than 5, assign the value of x to y.


Parentheses are balanced, if all opening parentheses have their corresponding closing parentheses. Given an expression as input, we need to find out whether the parentheses are balanced or not. For example, "(x+y)*(z-2*(6))" is balanced, while "7-(3(2*9))4) (1" is not balanced. The problem can be solved using a stack. Push each opening parenthesis to the stack and pop the last inserted opening parenthesis whenever a closing parenthesis is encountered. If the closing bracket does not correspond to the opening bracket, then stop and say that the brackets are not balanced. Also, after checking all the parentheses, we need to check the stack to be empty -- if it's not empty, then the parentheses are not balanced. Implement the balanced() function to return True if the parentheses in the given expression are balanced, and False if not. Sample Input: (a( ) eee) ) Sample Output: False



#your code goes here arr=[5,8,8,3,3,4,4,3,8,5,3,3,3,4,4,8,5,8,5,3]; sum= 0; k=0; for i in range(len(arr)): if arr[i] !=8: sum+=arr[i]; k=k+1; print(sum/k);