Answer:
The code for the function is given below in Python language
Explanation:
def append_string_to_file(filename, text):// function takes the filename // and text to append
f = open(filename, 'a')
f.write(text) //function part that writes the text
f.close() //closing the file using the explicit close function
Answer:
Answer is b. 10
Explanation:
The find() method is used to search the string for a specified value and searches the first occurrence of that value. It returns the position of that specified value. If the value is not found, this method returns -1.
Lets say we have a message variable that contains the string Happy holidays.
message = "Happy holidays"
We use the method find() to find days word from the Happy holidays string in the message variable.
The find() method will find the position of day.
If we look at the string Happy holidays we see that the word day is at the 10th position of the string.
H 1
a 2
p 3
p 4
y 5
h 6
o 7
l 8
i 9
d 10
a 11
y 12
s 13
So it is at 10th position so the statement
message.find("days")
returns 10
Answer:
1.ClassName and . operator
2. ClassName and [] operator
Explanation:
There are two ways to get the members of a class first one is by using dot(.) operator.
Example : with assumption that person is a class object and age is the member in it we can use it as:
person.age
Second way is to use [] operator with member as a string in it which is used by the compiler as key to get its value.
Example : person["age"]
Answer:
Testing that super user (SYSADMIN) access is limited to only appropriate personnel.
Explanation:
A test for logical access at an organization being audited would include testing that super user (SYSADMIN) access is limited to only appropriate personnel.