ALX Evaluation Quiz #3
ALX Evaluation Quiz #3
(/)
Date: 2022-07-20
Status: Done
Duration: 25 minutes
Score: 100.0%
# Success: 17
# Fail: 0
Responses
STDIN_FILENO
STDOUT_FILENO
STDERR_FIELNO
I don't know
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 1/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
1
(/)
89
90
891
I don't know
It's the node with the pointer to the next node equals to NULL
It's the node with the pointer to the previous node equals to NULL
I don't know
Forward
Backward
I don't know
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 2/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
malloc(sizeof(char) * 4)
4
8
12
16
I don't know
6. You're standing in line at a grocery store, which data type best represents this situation?
Score: 1.0
Queue
Array
Dictionary
Stack
I don't know
Counter: 12
Counter: 89
Counter: 101
I don't know
8. What's wrong with the following C code to get the nth node of a linked list?
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 3/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
Score: 1.0
(/)
Select all correct answers.
#include "lists.h"
/**
* get_nodeint_at_index - finds nth node of a listint_t list
* @head: list to evaluate
* @index: index of node to find
*
* Return: node found at index (SUCCESS), NULL if node does not exist
**/
if (head == NULL)
return (NULL);
ptr = head;
i = 0;
return (ptr);
}
>>> a = [1, 2, 3, 4]
>>> a[2] = 10
>>> a
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 4/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
[1, 2, 3, 4]
(/)
[1, 10, 3, 4]
[1, 2, 10, 4]
[1, 2, 10, 10]
I don't know
2 3 4 5 6 7 8 9 10
23456789
4 6 8 10 12 14 16 18
2468
I don't know
on
nohtyP
Python
si
is
I don't know
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 5/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
>>> a = { 'id': 89, 'name': "John", 'projects': [1, 2, 3, 4], 'friends': [ { 'id': 82, 'name': "Bob" },
(/)
{ 'id': 83, 'name': "Amy" } ] }
>>> a.get('friends')[-1].get("name")
89
[{'id':82, 'name':"Bob"}, {'id':83, 'name': "Amy"}]
'Amy'
'Bob'
Nothing
I don't know
14. Which symbol should I use to redirect the error output to the standard output?
Score: 1.0
2>&1
1>&2
2>
I don't know
15. Which line of code will create a list of every other number from 0 to 10 in reverse in
Python?
Score: 1.0
list(range(10, 0, -2))
array(range(10, 0, -2))
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 6/7
8/7/22, 10:22 AM Evaluation Quiz Corrections - show | Addis Ababa Intranet
a = 12
if a > 2:
if a % 2 == 0:
print("Tech")
else:
print("C is fun")
else:
print("School")
Tech
C is fun
School
I don't know
https://alx-intranet.hbtn.io/evaluation_quiz_corrections/251562 7/7