Python kba
There are more available on https://play.google.com/store/apps/details?id=com.master.askmastermaterial
Python 3 Programming ***********************
1.Which action should be avoided so that you do not mistakenly overwrite names that you have already defined?
use the wildcard import
2. While using Python IDLE, by how many space are the code suites indented?
4
3. When using the Python shell and code block, what triggers the interpreter to begin evaluating block of code?
execute command (wrong answer)
4. The bool class is subset of .
int
5. Which statement correctly assigns X as an infinite number?
x=flot('inf')
6. Which statement accurately defines the bool class?
Boolean not return false if the oprand is True
7. bytearray provides an mutable sequence (making it modifiable)
true
8. Using Pop in list will remove the popped up item.
true
9. Which statements prevent the escape sequence interpretation?
r'col\tcol2\tcol3\t'
10. Empty dictionary is represented as .
{}
11. Consider b is frozen set, what happen to b.add(3)?
Error as Frozen set cannot be modified
12. All of these range types are correct except ___.
range(20,40,-2)
13. What is the output of below code snippet - for char in 'Welcome': print (char, end='*') print()
W*e*l*c*o*m*e*
14. What is the output of the following code? for x in (1,10,100): print (x)
1 10 100
15. a = 0 if a: print("a's value") else: print("Sorry nothing will get printed")
Sorry nothing will get printed
16. What is the output of the following code count = 0 while count < 2: print (count, " is less than 2") count = count + 2 else: print (count, " is not less than 2")
- 0 is less than 2; 2 is not less than 2
17. Which methods can be used with list objects?
Reverse, pop, clear
18. a = -10 if a: print("a's value") else: print("Sorry nothing will get printed")
a's value
19. The 2 main versions of Python include
Python
2.x & 3.x
20. In what format does the input function read the user input ?
String
21. What is the output of min('Infinity')?
I - (Wrong, code output is I but dont know)
22. Which of these could be used in
tuple object
Sorted,lens,Max
23. Code written in Python 3 is backward compatible with Python 2.
False
24. Python supports automatic garbage collection.
true
25. Bitwise operators cannot be used on the float type
false
26. Which of the following attributes shows the characteristics of Python? Python is everywhere (Webscripting, 3D Modelling , Games , and Desktop applications ).
Object Oriented
27. a.difference(b) highlights the .
a-b
28. a.symmetricdifference(b) highlights the _.
a.union(b) - a.intersection(b)
29. Values in bytearray should be integers between
0-255
30. Is x,y=5,6 a valid statement?
true
31. What command is used to output text from both the Python shell and within a Python module?
print()
32. Which of these are salient features of Python, except?
limited platform Support
33. While using slicing in lists, list[0:2] is equivalent to .
list[:2]
34. The default decode option available in the byte data type is
unicode (Wrong answer)
35. What is the output of - listpt = list('Welcome') print(listpt)
['W', 'e', 'l', 'c', 'o', 'm', 'e']
36. Which of these methods can be used with list objects, except ?
decode,Lambda
37. The class which provides immutable sequence of elements
tuple
*****************
Attempt 2
******************
1. You can send an email whenever the chef-client fails using ____ handler.
Report
2. Which of the following is not an event in chef-client run?
:deleted_cookbook
3. When the success property of the run_status object is true ____handler is executed.
Report
4. You can attach callbacks to events using ______.
Handlers
5. Which of the following is not a Chef Handler?
test
6. Which of the following are the built-in handlers in chef?
None of these
7. You can send an email whenever the chef-client fails using ____ handler.
event
8. To generate a new key for the vault use the command _____.
9. Chef maintains a log which has all the users who accessed it.
false
10. To update the content of the vault use the command ______.
Update
11. The chef server has the private part of the RSA key and the nodes/users has the public part of the key.
false
12. To decrypt an item in the vault and open it in json format use the command _____.
edit
13. To delete a vault’s item, use the commad _____.
delete
14. The _____ resource from ohai cookbook will help you deploy ohai plugin.
ohai_plugin
15. Ohai plugins cannot make use of mixin libraries.
false
16. berks install is used to _______.
resolve dependencies
17. ____ is a dependency manager in cookbooks.
Berkshelf
18. To know what a chef client run would do, use the command _____.
Why-run
19. The only way to load exception/report handlers is using client.rb.
false
19. Consider a cookbook with name ‘fresco’ and the files within the resource/providers directory as ‘play’, then the custom resource will be ____.
fresco_play
20. The node related information are collected using _____.
ohai
21. The process of checking the state of resource collector using ChefSpec is called _______.
Unit Testing
22. Integration Testing uses ____
InSpec
23. The _____ object is used to run the report handler without any error handling.
run_report_unsafe
24. To run the knife commands in local mode instead of in server, use the option ____.
-z
25. Node related information from ohai are stored in a ______.
Node Object
26. The code to converge the system to desired state will be listed under ______.
providers
27. Use this option in the knife command to specify the files to be added to the vault item.
--file FILE
28. To see the test matrix use the command _____.
29. In a custom handler, _____ interface will define how the handler will behave.
30. The process of checking the desired state of the system is called ______.
Integrated Testing
31. The test files in ChefSpec will be place in _____ directory.
/spec/unit
--------------------------
******************
Puppet 5 - Cardinal
******************
1. Manifest files are stored as ____ file extension.
.pp
2. Puppet manifests are written in ______.
Domain Specific Language
3. Puppet does not run on Windows.
false
4. Puppet compiles catalog from ____.
All of them
5. What is the correct syntax for If-else conditional statment?
if{} elsif{} else
6. Which of the following is not used as a conditional statement?
while
7. Which function transforms data structure by removing non-matching elements?
filter
8. Which of the following mode is used to dry-run Puppet code?
--noop
9. Notify is to _____, whereas subscribe is to _____.
before,required
10. Which command is used for displaying facts in YAML format?
factor -y
11. Is it compulsory to preceed class parameters with its data type?
No
12. Which of the following is a valid input for file resource?
All
13. _____ is not a section in puppet.conf file.
mainifest
14. To see the value of a setting in Puppet, which of the following will you use?
puppet config print
15. You can override modulepath from the commandline using _____.
--
modulepath
16. Manifests have logic (conditional statements) and Catalogs (compiled from manifests) do not have logic.
true
17. Which attribute is used to start a service at boot time?
enable
18. _____ function is used to repeat a block of code any number of times.
each
19. You should install Ruby first before installing Puppet-Agent in machines.
No
20. Puppet code is written in _____ language.
declarative
21. Which of the following file does Puppet Agent downloads from Puppet Master?
catalog
22. Which of the following command is used in Standalone Architecture of Puppet?
puppet apply
23. _____ is used to see the modules you have installed.
puppet module list
24. Which of these is the default section in puppet.conf file, which is used by all commands and services?
main
25. Which of the following is not a Pull based Configuration Management tool?
Ansible
26. Puppet compiles catalog from _____.
mainifest -- Wrong Answer, May be correct is All the option
************************
Kibana - Data Exquisites ***************** ******
1. What can be created with the help of Kibana?
All of the above
2. If Elasticsearch is not visible via Kibana, what could be the problem?
Both of these
3. Is it necessary to use curl command while querying in Kibana?
No, not necessary
4. Default location to run Kibana is _.
localhost:5601
5. What is Kibana?
A visulization tool
6. Visualize page is responsible for __.
All of these
7. Geohash is used to create buckets based upon .
geo_point fileds
8. Which of the following is not a metric aggregation?
log
9. Date histogram is performed on date/time values that are automatically extracted from documents.
true
10. In bucket aggregation, buckets are created to store _.
Documents
11. You can only set the Index pattern once.
false
12. A dashboard can be embedded in a HTML page.
true
13. How can we insert a dashboard into a HTML page?
With Embedded iframe
14. Why is Dashboard used for?
All of these
15. We can show multiple dashboards in visualization page.
false
16. Timelion is a .
Time Series data visulizer
17. What is the function of Gauge?
It indecates the status of metric in referance to a threshold value
18. Discover is used for .
Both of these
19. Can you share a dashboard as we shared a visualization?
Yes, we can
20. Where can you access discover page in Kibana?
Top Left side below kibana logo
21. Anyone in the world can see the visualization with the help of the sharable link.
No, Only those client who have access to Kibana can view
22. What will Max Aggregation do?
Return Max value from numeric fields present in each bucket
Comments
Post a Comment