Answer:
A: Mark Entry
C: Insert Index
Explanation:
It includes Mark an Entry and Insert Index.
Index in Microsoft Word is used to list the terms or topics which are in the document as well as the pages they appear.
The steps to create an Index are:
You should place the insertion point where you want the index tab to appear.At top of the bar, you should click References tab, click Index group, click Insert Index. Then, the Index dialog box will appears.With the click of Ok, the Index will appears at the insertion point.In conclusion, the two options includes Mark an Entry and Insert Index.
Read more on this here
brainly.com/question/17864103
-(-13) P binary using signed. 2's complement representation
Perform the arithmetic operations (+42) + (-13) and (-42)
negative .
Consider the balloon
Answer:
00011101
00011101
Explanation:
Given the following arithmetic operations
a) (+42) + (-13)
b) (-42) - (-13)
From (a):
We need to convert +42 into binary, so we get = 00101010
Now for +13, when it is converted into binary, we get = 00001101
But, here, the 13 is negative. So, here is what we will do, we will have to take the two compliment of the binary. After doing that, we get = 111110011
∴
+ 42 → 00101010
- 13 → 1 1 1 10011
+29 000 11101
Thus, the arithmetic operation after we use 2's complement is 00011101
b)
Here both 42 and 13 are negative. Using two complement representation
-42 is first converted to binary as 00101010, Then → 11010101 + 1 = 11010110
-13 is converted to binary as 00001101 → 11110010 = 11110011
In between, a negative sign exists, so we take another 2's complement.
i.e.
11110011 → 00001100 + 1 = 00001101
- 42 → 1 1 01 0110
+13 → 00001 101
-29 1 1 1 00011
since there is no carry, we take two's complements for the result as:
1 1 1 00011 →00011100 + 1 = 00011101
In this exercise, you will get some practice with the __add__ method by implementing it for a class called ContactBook. This class represents a collection of names and phone numbers. ContactBook stores its information as a dictionary, where the key is a name and the value is a phone number or group of phone numbers. The keys and values in this dictionary are stored as strings. When printed, a ContactBook might look like this:
Answer:
class ContactBook():
def __init__(self):
self.contacts ={}
def __repr__(self):
return str(self.contacts)
def add_contact(self,name,number):
self.contacts[name] = number
def __add__(self, other):
new_contact = ContactBook()
other_contact = other.contacts.keys()
for name,num in self.contacts.items():
if name in other_contact:
new_contact.add_contact(name,num or other_contact[name])
else:
new_contact.add_contact(name,num)
for name,num in other.contacts.items():
if name not in self.contacts:
new_contact.add_contact(name, num)
return new_contact-
cb1 = ContactBook()
cb2 = ContactBook()
cb1.add_contact('Jonathan','444-555-6666')
cb1.add_contact('Puneet','333-555-7777')
cb2.add_contact('Jonathan','222-555-8888')
cb2.add_contact('Lisa','111-555-9999')
print(cb1)
print(cb2)
cb3 = cb1+cb2
print(cb3)
Explanation:
The ContactBook class holds the contact details of an instance of the class. The class has three magic methods the '__repr__', '__init__', and the '__add__' which is the focus of the code. The add magic method in the class adds the contact book (dictionary) of two added object instance and returns a new class with the contact details of both operand instances which is denoted as self and other.
The ternary search algorithm is a modification of the binary search algorithm that splits the input not into two sets of almost-equal sizes, but into three sets of sizes approximately one-third.
a) Verbally describe and write pseudo-code for the ternary search algorithm.
b) Give the recurrence for the ternary search algorithm
c) Solve the recurrence to determine the asymptotic running time of the algorithm. How does the running time of the ternary search algorithm compare to that of the binary search algorithm.
Answer:
def ternary(arr, x):
l = len(arr)
arr = sorted(arr)
if l > 0:
mid1 = round((1/3) * l)
mid2 = round((2/3) * l)
if arr[mid1] == x:
return mid1
elif arr[mid2] == x:
return mid2
elif x < arr[mid1]:
return arr[:mid1].index(x)
elif x >arr[mid2]:
return mid2 + (arr[mid2+1:].index(x) + 1)
elif x >arr[mid1] and x < arr[mid2]:
return mid1 + (arr[mid1+1:mid2].index(x) + 1)
else:
return -1
else:
return "The arr list is empty"
dog_num = ["edd", "dodie", "robin", "marvin", "twinkle", "ata", "bernie", "mara", "jennie", "lebor"]
d = ternary(dog_num, "mara")
print(d)
The time complexity of the algorithm is 5logn which is O(logn) in big-O notation.
Explanation:
The ternary search algorithm is similar to the binary search algorithm but with a difference of two midpoints for the one-third index and two-third index of the data structure, and It splits the data structure into three parts. The index of the searched term is returned else the program returns -1.
In this exercise we have to use computer knowledge to write a code and solve it, so we can find that:
So we can identify that the answer is in the attached image, that way we can also see that the code works informing us the result.
The ternary search algorithm is similar to the binary search algorithm but with a difference of two midpoints for the one-third index and two-third index of the data structure. The index of the searched term is returned else the program returns -1.
Thus, writing the same code as the image to make it easier to copy, we find that it will be:
def ternary(arr, x):
l = len(arr)
arr = sorted(arr)
if l > 0:
mid1 = round((1/3) * l)
mid2 = round((2/3) * l)
if arr[mid1] == x:
return mid1
elif arr[mid2] == x:
return mid2
elif x < arr[mid1]:
return arr[:mid1].index(x)
elif x >arr[mid2]:
return mid2 + (arr[mid2+1:].index(x) + 1)
elif x >arr[mid1] and x < arr[mid2]:
return mid1 + (arr[mid1+1:mid2].index(x) + 1)
else:
return -1
else:
return "The arr list is empty"
dog_num = ["edd", "dodie", "robin", "marvin", "twinkle", "ata", "bernie", "mara", "jennie", "lebor"]
d = ternary(dog_num, "mara")
print(d)
See more about code at brainly.com/question/22841107
Use input() function to take 4 user inputs as variables and choose at least 2 ways to print out the following statements. You cannot print the statement literally.
Answer:
statements = tuple(input("Enter four statements separated by comma: ").split(","))
st1, st2, st3, st4 = statements
#print with:
print(f"{st1}, {st2}, {st3}, {st4}")
# or:
print("{}, {}, {}, {}".format(st1, st2, st3, st4))
Explanation:
The input function in python is used to prompt for user input. It returns a string. The code above splits the string of the input function and converts it to a tuple, which is unpacked in four variables st1, st2, st3, and st4.
The variables can be printed out as strings directly or by using the "f" keyword or the format function.
Write a program with total change amount as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.
If input is 0 or less, output is 'No Change'
For Example: Input: 45
Output:
1 Quarter
2 Dimes
input_val = int(input())
if input_val <= 0:
print('No change')
else:
num_dollars == input_val // 100
input_val %= 100
num_quarters == input_val // 25
input_val %= 25
num_dimes == input_val // 10
input_val %= 10
num_nickels == input_val // 5
input_val %= 5
num_pennies == input_val
if num_dollars > 1:
print('%d dollars' % num_dollars)
elif num_dollars ==1:
print('%d dollar' % num_dollars)
if num_quarters > 1:
print('%d quarters' % num_quarters)
elif num_quarters ==1:
print('%d quarter' % num_quarters)
if num_dimes >1:
print('%d dimes' % num_dimes)
elif num_dimes ==1:
print('%d dime' % num_dimes)
if num_nickels >1:
print('%d nickels' % num_nickels)
elif num_nickels ==1:
print('%d nickel' % num_nickels)
if num_pennies >1:
print('%d pennies' % num_pennies)
elif num_pennies ==1:
print('%d penny' % num_pennies)
Answer:
b ,/knlk
Explanation:
Consider the following method, which is intended to return an array of integers that contains the elements of the parameter arr arranged in reverse order. For example array containing (-5, 3, 2, 7) then a new array (-5, 3, 2, 7) contains should be returned and the parameter are should be left unchanged .
public static int[] reverse(int) arr)
Intl new new intarr.length);
for (int k = 0; K arr.length: )
* Bissing statement / return newer;
Write down the statements that can be used to replace / Missing statement so that the method works as intended?
Code:
public static int[] reverse(int [] arr){
Int [] newArr = new int[arr.length];
for (int k = 0; k<arr.length;k++){
/*Missing statement */
}
return newArr;
Answer:
Replace the comment with:
newArr[k] = arr[arr.length-k];
Explanation:
Required
Complete the code
In the given code:
The first line of the given code defines the method
public static int[] reverse(int [] arr){
The next line declares array newArr withe same length as array arr
Int [] newArr = new int[arr.length];
The next line iterates through the elements of array arr
for (int k = 0; k<arr.length;k++){
The /* Missing statement */ is then replaced with:
newArr[k] = arr[arr.length-k];
The above statement gets the elements of array arr in reversed order.
This is so because, as the iteration iterates through array arr in ascending order, arr.length-k gets the element in reversed order
Explain briefly what would happen if marketing research is not conducted before a product is developed and produced for sale.
Answer:
Neglecting to do market research can result in indecision and inaction, fear of risk or the truth, and/or too many options, which can lead to paralysis. When launching a new product, effective market research will help you narrow down your true market potential and your most likely customers.
Explanation:
A customer is looking for a storage archival solution for 1,000 TB of data. The customer requires that the solution be durable and data be available within a few hours of requesting it, but not exceeding a day. The solution should be as cost-effective as possible. To meet security compliance policies, data must be encrypted at rest. The customer expects they will need to fetch the data two times in a year. Which storage solution should a Solutions Architect recommend to meet these requirements
Incomplete question. The options;
A. Copy data to Amazon S3 buckets by using server-side encryption. Move data to Amazon S3 to reduce redundancy storage (RRS).
B. Copy data to encrypted Amazon EBS volumes, then store data into Amazon S3.
C. Copy each object into a separate Amazon Glacier vault and let Amazon Glacier take care of encryption.
D. Copy data to Amazon S3 with server-side encryption. Configure lifecycle management policies to move data to Amazon Glacier after 0 days.
Answer:
D. Copy data to Amazon S3 with server-side encryption. Configure lifecycle management policies to move data to Amazon Glacier after 0 days.
Explanation:
Note, the Amazon S3 (Amazon Simple Storage Service) is a cloud storage service that is both durable, cost-effective, and secure. Since the customer wants a storage space of up to 1,000 TB (terra bytes), this makes the Amazon S3 solution the most recommended solution.
The process begins by copying the data to Amazon S3 with server-side encryption. Next, set-up the configuration of lifecycle management policies to move data to Amazon Glacier after 0 days.
1. Which of the following cables are used in networking? Check all that apply.
a HDMI cable
b. Ethernet
C. Auxiliary cable
d. Fiber optic cable
Answer:
ethernet and HDMI for sure those 2
Explanation:
^
If you have an array of 100 sorted elements, and you search for a value that does not exist in the array using a binary search, approximately how many comparisons will have to be done?
a)7
b)100
c)50
Answer:
50
Explanation:
as binary search will search the array by dividing it into two halves till it find the value.
At the settings window, the app buttons below the background thumbnails are used to change the
Select one:
a. image options for the Lock screen,
b. apps that appear on the Start menu.
c. screen saver settings.
d. apps that give notifications on the Lock screen image.
Write a program using python 3 that asks the user how many integers they would like to enter. You can assume that this initial input will be an integer >= 1. The program will then prompt the user to enter that many integers. After all the numbers have been entered, the program should display the largest and smallest of those numbers (no, you cannot use lists but you can use loops, if statements, comparison & logical operators). Your code should work correctly no matter what integers the user enters. When you run your program it should match the following format:
How many integers would you like to enter?
4
Please enter 4 integers.
-4
105
2
-7
min: -7
max: 105
I've included my code in the picture below. Best of luck.
A system administrator at Universal Containers created a new account record type. However, sales users are unable to select the new record type when creating new account records. What is a possible reason for this? (Choose 2)
Explanation:
We have these reasons below as the
The reason why sales users are not able to select the new record type while they are trying to create a new account:
1. The users profile does not contain the record type yet. That is, this record type has not been added to the profile of the sales user.
2. This record type is yet to be activated.
You have booted a new computer (purchased from a manufacture) to PowerShell prior to the computer starting the Out-of-Box Experience. From PowerShell, you run the Set-ExecutionPolicy Unrestricted cmdlet. What is the function of this cmdlet?
Answer:
It allows Windows to run script files.
Explanation:
A cmdlet is an abbreviation for command-let and it is a special type of lightweight command that is typically used with the Microsoft Windows PowerShell script for the automatic performance of a single-specific function on a computer system.
In this scenario, you have booted a new computer (purchased from a manufacture) to PowerShell prior to the computer starting the Out-of-Box Experience. From PowerShell, you run the Set-ExecutionPolicy Unrestricted cmdlet. Thus, the function of this cmdlet is to allow Windows run script files known as scripts which have been typed into the command line.
There is a non-empty array of String's named names. Write a code segment that removes the last letter of the String stored in the very last position of names. For bragging rights and if possible (and I'm not sure if it is), write a single statement that performs this task.
Answer:
Explanation:
The following code is written in Python. It is a function called remove_last_letter that does just that, removes the last letter of the last element in the array. and saves it back into the array. The code is written in three statements but only the middle statement is the actual code, the other two are the function creation statement and the last is the return statement.
def remove_last_letter(names):
names[-1] = names[-1][0:-1]
return names
When you sign in to your Microsoft account with another Windows device, your settings will appear very differently than they do on your other Windows 10 devices, depending on the device. True or False
Answer:
True
Explain:
All of the setting are device setting that dont follow your account.
Twenty years ago, most games were sold in brick and mortar stores. How did independent game developers get their games into these stores?
Question 18 options:
by working with a crowdfunding specialist who would give developers funds to offer to retailers if they promised to sell the game
by working with a piracy specialist who would ensure the game was distributed to each and every retailer, regardless of licensing
by working with a retail specialist who distributed video games to consumers
by working with a publisher who would help the developer bring their games to stores and then market them and get as much exposure and traction as possible
Answer: by working with a publisher who would help the developer bring their games to stores and then market them and get as much exposure and traction as possible
Explanation:
Publishers were and are still important in the gaming world even if they have now increasingly moved online. Publishers have a reputation and with this reputation comes access to a wide array of services that enable them to sell games.
This was the same when most stores were brick and mortar. One would sign a deal with a publisher who through their expertise would help the game get to market and give it publicity so that it can be sold.
Write a recursive function to determine if a number is prime.
Answer:
Follows are the code to find the prime number:
import java.util.*;//import package for user input
public class Main//defining a class
{
public static boolean Prime(int x, int j)//defining a method isPrime
{
if (x<= 2) //use if block to check x less than equal to 2
return (x== 2) ? true : false; //use bitwise operator to return value
if (x%j == 0) //use if to check x%j equal to 0
return false;//return false value
if (j*j > x)//defining if that check i square value greater than n
return true; //return true value
return Prime(x, j+1); //callling recursive method
}
public static void main(String[] as)//main method
{
int n; //defining integer variable
Scanner oxc=new Scanner(System.in);//creating Scanner class object
n=oxc.nextInt();//input value
if (Prime(n, 2)) //use if block to call isPrime method
System.out.println("Yes"); //print value
else //else block
System.out.println("No"); //print value
}
}
Output:
5
Yes
Explanation:
In this code, a static boolean method "Prime" is declared, that accepts two integer variables in its parameter and defines the if block that checks the prime number condition by the recursive method and returns a value true or false. Inside, the main method an integer variable is declared that uses the Scanner class object for input value and passes into the method and prints its value.
SQL allows the use of special operators in conjunction with the WHERE clause. A special operator used to check whether an attribute value matches a value contained within a subset of listed values is ____. Question 20 options: BETWEEN IS NULL LIKE IN
Answer:
LIKE.
Explanation:
A structured query language (SQL) can be defined as a domain-specific language designed and developed for managing the various data saved in a relational or structured database.
In Computer programming, any word restricted for use, only in object names because they belong to the SQL programming language are called reserved word.
Hence, these reserved words can only be used as the name of an object but not as an identifier e.g the name of a function, label or variable.
Some examples of reserved words in structured query language (SQL) are UPDATE, GROUP, CURRENT_USER, CURRENT_DATE, CREATE, DELETE etc.
Hence, SQL allows the use of special operators in conjunction with the WHERE clause. A special operator used to check whether an attribute value matches a value contained within a subset of listed values is LIKE.
A loop that will output only the names that come before "Thor" in the alphabet from the names list.
names = ["Kevin", "Joe", "Thor", "Adam", "Zoe"]
names.sort()
for x in names:
if x == "Thor":
break
else:
print(x)
I made up my own names for the sake of testing my code. I wrote my code in python 3.8. I hope this helps.
A loop that will output only the names that come before "Thor" in the alphabet from the names list is written below:
What is a loop?A loop is a set of instructions in computer programming languages that repeatedly repeats itself until a given condition is met.
The time it takes to determine the number of times the loop iterates before the loop executes is the difference between the decorative and extensive program loops.
If a loop's block of code is to be repeated until the provided condition turns false, and this condition is tested before the block is run, the loop is said to be a pretest.
names = ["Kevin", "Joe", "Thor", "Adam", "Zoe"]
names.sort()
for x in names:
if x == "Thor":
break
else:
print(x)
Therefore, the loop is written or coded above.
To learn more about the loop, refer to the link:
https://brainly.com/question/25955539
#SPJ2
Mobile cameras are now of a higher quality than when they first arrived on the market. Describe the difference in
resolution that has come about and how that has led to higher photo quality.
Answer:
When mobile cameras first arrived on the market, they did not have a high-quality resolution. But after the years, mobile cameras are able to record a significant amount of digital information.
PLEASE HELP!!! WILLGIVE BRAINLIEST!!!
By using an understanding of subtractive color, why do black cars left outside in a sunny day get hotter faster than white cars?
Write a method intersect that accepts two sorted array lists of integers as parameters and returns a new list that contains only the elements that are found in both lists.
Answer:
Explanation:
The following code is written in Java. It creates a function called equalElements that takes two ArrayList of integers as parameters loops through both of them to find the elements that are equal in both and then adds those elements to a new ArrayList called repeated. Then the ArrayList is returned to the user.
public static ArrayList<Integer> equalElements(ArrayList<Integer> arrOne, ArrayList<Integer> arrTwo) {
ArrayList<Integer> repeated = new ArrayList<>();
for (int x: arrOne) {
for (int i: arrTwo) {
if (x == i) {
repeated.add(x);
break;
}
}
}
return repeated;
}
Question # 2 Multiple Choice The _____ method returns an integer between the two provided numbers. It can take the value of either of the provided numbers. seed randint random range
Answer:
randint
Explanation:
Answer:
randint
Explanation:
ed 2021
While setting up a computer on the network, you use 'ipconfig' and see that the IP address is currently 10.24.16.160, with subnet mask 255.255.255.192. Where did the IP address likely come from?
Answer:
Explanation:
The IP address either came from your router or your Internet Service Provider (ISP). Sometimes ISP's automatically assign every device under their network an IP address, while other times they allow each individual's home network router to determine the IP of every connected device. This router can either assign an automatic IP address to each device from a range of addresses or the IP address can be assigned manually to each device as static.