Saturday, 11 September 2021

PYTHON - TEST (Spoken Tutorial)

PYTHON TEST

 01. Given ``odd = set([1, 3, 5, 7, 9])``

         ``squares = set([1, 4, 9, 16])``.

        What is the value of ``odd ^ squares``?

Ans :  set([3, 4, 5, 7, 16])

02. What does  ones_like() function do?

Ans : Return an array of ones with the same shape and type as a given array

03. What is the output of following?

        x = 12345

        for i in x :

        print(i)

Ans : error

04. How do you save a figure in png format with the name sine-curve?

Ans : savefig(‘sine-curve.png’)

05. What is the output of following?

        list = [1,2,3,4,5,6,7,8,9,10]

        l = sum(list[::2])

        print(l)

Ans : 25

06. What error occurs when you execute?

        a = b

Ans : NameError

07. What is the value assigned as index to the first element in a list?

Ans : 0

08. You should keep open the plot while saving the it.

 

Ans : True

09. What is the output of following?

        print(“abcabcab”.split(‘c’, 0))

Ans :  [‘abcabcab’]

10. What is the output of the following?

        a1 = array([[1,2,3,4],[5,6,7,8],[9,10,11,12]])

         print(a1[:,1])

Ans : Error

11. What arithmetic operators cannot be used with strings ?

Ans : -

12. What is the output of the expression,  7*1**7 ?

Ans : 7

13. Which of the following functions does exactly the opposite of split() function ?

Ans : join()

14. To use the loadtxt command, each row should have the same number of values?

Ans : True

15. What is the value assigned as index to the first element in a list?

Ans : 0

16. Which marker is used to get circles...?

Ans : "0"

17. Which of the following creates 100 equally spaced points between -pi/2 and pi/2?

Ans : linspace(-pi/2, pi/2, 100)

18. Which of the following imports the odeint function.?

Ans : from scipy.integrate import odeint

19. Given two arrays A and B where ``A`` which contains co-efficients of a system of equations and ``B`` which                    

         contains    it’s constants. How will you solve the given system of equations?

Ans : solve(A,B)

20. Given the list primes, ``primes = [2, 3, 5, 7, 11]``, Which of the following code will produce the reverse of the list      ``primes``:

       (A) primes.reverse()

       (B) primes[::-1] ?

Ans : Both (A) and (B) are correct

21. Whih command is used to clear the plot?

Ans : clf()

22. What is the output of the below code snippet?

        x=0

        for y in range(21):

        x+=y

        print x

Ans : Sum of numbers up to 20(including)

23. Given strings s and t, ``s = "Hello"`` and ``t = "World"`` and an  integer r, ``r = 2``. What is the output of s * r + s * t?

Ans : HelloHelloWorldWorld

24. ``x = array([1, 2, 3], [5, 6, 7])`` is a valid statement?

Ans : False

25. Indentation is not mandatory in Python?

Ans : False

26. What is the function to get both eigen values and eigen vectors of a matrix?

Ans : eig()

27. If ``a = [1, 1, 2, 3, 3, 6,6,4]``. What is set(a)

Ans : set([1, 2, 3, 6, 4])

28. What will be the output of the below code?

       list1  = [1, 2, 3]

       list1.append([4, 5, 6])

       print(len(list1))

Ans : 4

29. Given the array, ``A = array([12, 15, 18, 21])``, how do we access the element ``18``?

Ans : A[2]

30. The % in %hist exist in all python interpreters.

Ans : False



PYTHON TEST | BY :- NISHANT KUMAR

 


Friday, 10 September 2021

INTRODUCTION TO COMPUTER - TEST (Spoken Tutorial)

INTRODUCTION TO COMPUTER

 

01.  In Google drive, which of the following is used to creat  a presentation ?      

Ans : Google Slides                                                        

02. Deleted files or documents will be displayed under ______

Ans : Trash

03. Which of the folloeing is input device ?

Ans : All of these options (Camera,Keyboard,Mouse)

04. ___ is the visual display unit of a computer.

Ans : Monitor

05. Which of the following is output device ?

Ans : Monitor

06. A computer gives results in the form of ____

Ans : Output

07. Which of the following is not a “Google product” ?

Ans : Fecbook   

08. What is the shortcut key of Print command ?

Ans : Ctrl + P

09. Pressing the right mouse button, activates non-standard actions like shortcuts.

Ans : True

10. Printer is an input device.

Ans : False

11. In audio jacks, the green coloured port is used for connecting a ____

Ans : Headphone

12. The whole process of loading the operating system is called ______

Ans : Booting the computer

13. All the files in the “Trash”menu, will automatically be deleted permanently from the google server after ____

Ans : 30 days

14. BCC stands for

Ans : Blind Carbon Copy

15. Maximum limit for adding email-ids in the recipients fieds- TO, CC and BCC  is

Ans : 500

16. What does CPU stands for ?

Ans : Central Processing Unit

17. What does PSU stands for ?

Ans : Power Supply Unit

18. In google drive, we can create

Ans : All of these (Spreadsheets,Documents,Presentation)

19. Gmail allows us to do basic formatting to the text in the body of our email.

Ans : True

20. Output is stored in _____

Ans : Storage unit

 


Introduction to Computer | By :- NISHANT KUMAR

 


ARDUINO - TEST (Spoken Tutorial) ANSWER