Answer:
#include <math.h>
#include <stdio.h>
#include <string.h>
#define BASE 3
#define NRQUESTIONS 15
void toABC(int n, char* buf, int base, int size) {
memset(buf, 'A', size);
buf[size] = 0;
while (n && size) {
buf[--size] = 'A' + (n % base);
n /= base;
}
}
int main()
{
char buf[16];
for (int i = 0; i < pow(BASE, NRQUESTIONS); i++) {
toABC(i, buf, BASE, NRQUESTIONS);
printf("%s\n", buf);
}
}
Explanation:
Assuming 3 is the number of possible answers to choose from for each question.
I tackled this by having an integer counter enumerate all values from 0 to 3^15, and then convert each integer to a base-3 representation, using ABC in stead of 012.
In the GO programming language you can't declare a float, it must be a float32 or float64. Why do you think this is done if the data type is not necessary? Why do you think they used float64 instead of double? Think about the lexical analyzer and how it interprets a symbol.
Answer and Explanation:
a. Go programming language specifies data types and does not allow mixing them up. Therefore instead of just declaring a float variable, one has to be specific and declare either a float32(single precision floating point number) variable or float64(double precision floating point number). Float64 numbers occupy larger spaces and could be slower in some systems but they represent more accurate numbers.
b. Float64 is more accurate and is used by most math libraries. Float64 and double are same thing, although double precision numbers are called float64 in Go, it doesn't affect the lexical analyzer in any way.
what number will be output by the console.log command on line 5?
Answer:
16
Explanation:
If you follow the line of code and add 1, 2, and then 3, 10 + 1 + 2 + 3 = 16.
Please, need Brailliest. if you need any further assistance let me know.
Jacob has a text file open, and he is typing on the keyboard. What is the best description of how the
changes are being implemented?
The original file is temporarily changed; the changes become permanent when he clicks "save."
O The new version is kept in a special virtual space; the file is only changed when he clicks 'save."
O The information is stored on the clipboard.
O A copy is created with a new filename, which will overwrite the old one when he clicks "save."
Answer:
The new version is kept in a special virtual space; the file is only changed when he clicks “save.”
Explanation:
I took the test and got it correct.
You defined a book data type.
class book:
title = ''
author = ''
pages = 0
Which statement creates an instance of your book?
myBook.myBook = book()
myBook = new book()
myBook = book
myBook = book()
Answer:
myBook = book()
Explanation:
Correct answer edge 2020
Answer:
myBook=book()
Explanation:
took test
Guess The Song
Trade my 4x4 for a G63, ain't no more free Lil Steve
I gave 'em chance and chance and chance again, I even done told them please
It is to be noted thatthe title of the above song is " The Bigger Picture" by Lil B.
What is the central idea of "The Bigger Picture" by Lil B?The core theme explored in the song "The Bigger Picture" by Lil B is the existence of societal injustices and systemic biases that go beyond isolated events or individuals.
The song highlights the importance of finding comprehensive solutions, acknowledging that these issues have endured for generations and demand more than just activism or online movements.
Lil B shares personal experiences with unjust treatment and encourages listeners to grasp the broader perspective, striving for substantial transformations in society.
Learn more about songs at:
https://brainly.com/question/27263334
#SPJ6
IN C++Write a recursive method insertLast(const ItemType& anEntry) to insert anEntry to the end of the Linked List.We can determine how many digits a positive integer has by repeatedly dividing by 10 (without keeping the remainder) until the number is less than 10, consisting of only 1 digit. We add 1 to this value for each time we divided by 10. Write a recursive function numOfDigits(int n) to return the number of digits of an integer n.
Answer:
#include <iostream>
#include <cstdlib>
int numOfDigits(int n) {
if (std::abs(n) <= 9) return 1;
return 1 + numOfDigits(n / 10);
}
int main()
{
int a[] = { 0, 1, -24, 3456, 12345 };
for (int n : a)
std::cout << n << " has " << numOfDigits(n) << " digits" << std::endl;
}
Explanation:
This is the answer to your second question.
The first question requires some clarification on how the linked list is defined.
Which of the following can help you get pre-approved for a loan? A. Having a college degree B. Having a good credit score C. Knowing which house you want to buy D. Living close to the bank or lending institution MAKE YOU BRRAINELEST
Answer:
A
Explanation:
Answer:
B
Explanation:
What should you consider when looking at houses to buy? A. Location B. Size and condition of the yard C. Size, features, and condition of the house D. All of the above MAKE YOU BRAINELEST
Answer:
A
Explanation: Would you like to buy a house in the desert
Answer:
The answer to your question is D. All of the above
python
You need to have some text that will repeat on 50 random images to create memes for your Twitter account. Don’t worry about having any images; just get the text to repeat for a meme that you would create. That would take you a while to do… but luckily you have for loops! Using a for loop, print “Takes one political science class. Knows how to solve the world’s problems.” for your 50 meme images, so 50 times
for i in range(50):
print("Takes one political science class. Knows how to solve the world's problems.")
I hope this helps!
What charts the cost to the company of the unavailability of information and technology and the cost to the company of recovering from a disaster over time?A. Disaster organizational cost analysisB. Disaster recovery improvementsC. Disaster financial costD. Disaster recovery cost curve
Answer:
D. Disaster recovery cost curve
Explanation:
Disaster Recovery Cost Curve can be regarded as the chart to the cost of the
unavailability of information and technology as well as the the cost to the company of recovering from a disaster over time. It should be noted that recovery plan is very essential in any organization because it makes response to disaster as well as other emergency that can tamper with information system to be easier as well as minimization of any effect of the disaster on business operations.
Dolphin TecX is a new tech company that just issued smart watches to its employees. But there is a problem: Getting the watches to receive company email has not been easy. What problem has the company just experienced that is one of the biggest problems in networking?
A.Keeping devices protected from virus and security threats
B.Getting hardware and softwarr from different sources to work together.
C.Gettint email programs to work correctly
D.Justifiying the cost of purchasing new technology
Answer:
Getting hardware and software from different sources to work together.
Explanation:
Answer: B.Getting hardware and software from different sources to work together.
In Object layer, if we will create more Objects, then design will be more efficient and scalable because
Answer:
More developers can work concurrently.
Explanation:
Given that having a lesser object in program designing can make the process cumbersome. The idea of having more objects or breaking down application functionalities into various objects in a virtual workforce tool like Blue Prism, UiPath RPA, Pega Platform, etc can only increase the efficiency.
Hence, In the Object layer, if we will create more Objects, then the design will be more efficient and scalable because "More developers can work concurrently."
What refers to the outline of the necessary components for a project, first given to developers at the beginning of a project and modified through the development cycle?
a
General design document (GDD)
b
Software blueprint (SBP)
c
Architectural structure orders (ASO)
d
Software requirement specifications (SRS)
Answer:
d
Explanation:
Why does the IPv6 format use letters and numbers?
a
The IP address is numerical and is linked to the domain name, which is text-based.
b
It is like a street address with a number and name combination for each location
c
It is based on hexadecimal, which uses numbers 0-9 and letters A-F
d
When the IP address has to be manually entered, it can be keyed in more easily
Answer:
c is the response hope it helps
Consider the following class which is used to represent a polygon consisting of an arbitrary number of (x, y) points:
class Polygon :
def __init__(self) :
self._x_points = []
self._y_points = []
Answer:
The init method of the Polygon class defines two attributes 'x' and 'y' which are both lists. To add points to the lists x and y, define the add_point method;
def add_point(self, x, y) :
self._x_points.append(x)
self._y_points.append(y)
Explanation:
A class is a blueprint of a data structure. It contains the attributes and methods of the data structure type. Attributes are features of a data structure defined as variables that can be either a class attribute or an attribute of the instance of the class object. A method is just a function defined in a class.
The add_point method in the polygon class accepts two parameters and appends the values to the x and y lists defined in the init method.
The method longestStreak is intended to determine the longest substring of consecutive identical characters in the parameter str and print the result.
For example, the call longestStreak("CCAAAAATTT!") should print the result "A 5" because the longest substring of consecutive identical characters is "AAAAA".
Complete the method below. Your implementation should conform to the example above.
public static void longestStreak(String str)
public class JavaApplication72 {
public static void longestStreak(String str){
char prevC = '_';
String largest = "";
String txt = "";
for (int i = 0; i < str.length(); i++){
char c = str.charAt(i);
if (c != prevC){
txt = "";
}
txt += c;
if (txt.length() > largest.length()){
largest = txt;
}
prevC = c;
}
System.out.println(largest.charAt(0)+" "+largest.length());
}
public static void main(String[] args) {
longestStreak("CCAAAAATTT!");
}
}
A Method in java is a block of named statements, that can be executed by simply calling it.
The method longestStreak in Java is as follows where comments are used to explain each line is as follows:
public static void longestStreak(String str){
//This initializes the initial character to an empty character
char previousChar = ' ';
//This initializes the current and the longest streak to an empty string
String largestStreak = "", currentStreak = "";
//This iterates through the string
for (int i = 0; i < str.length(); i++){
//This checks if the current character and the previous character are not the same
if (str.charAt(i) != previousChar){
//If yes, the streak is reset
currentStreak = "";
}
//The streak continues here
currentStreak += str.charAt(i);
//This checks the length of the longest streak
if (currentStreak.length() > largestStreak.length()){
largestStreak = currentStreak;
}
//This sets the previous character to the current character
previousChar = str.charAt(i);
}
//This prints the longest streak and its length
System.out.println(largestStreak.charAt(0)+" "+largestStreak.length());
}
At the end of the method, the longest streak and its length, are printed.
See attachment for sample run
Read more about similar programs at:
https://brainly.com/question/13464860
You are in the process of configuring an iSCSI storage area network (SAN) for your network.
You want to configure a Windows Server 2016 system to connect to an iSCSI target defined on a different server system. You also need to define iSCSI security settings, including CHAP and IPsec.
Which tool should you use?
A. iSCSI under File and Storage Services in Server Manager
B. iSCSI Initiator
C. Multipath I/O
D. Internet Storage Name Service
Answer: B. iSCSI Initiator
Explanation:
Based on the above scenario discussed, the tool that'll be used is the iSCSI Initiator. It should be noted that it typically functions as the iSCSI client.
The Internet Small Computer System Interface (iSCSI) initiator can be used to configure an iSCSI storage area network (SAN) for the network. Through the iSCSI Initiator, commands can be sent over an IP network. When one wants to connect to a particular iSCSI target, the iSCSI Initiator can be used.
If you use microsoft windows, the windows _____ application can automatically update the operating system as well as microsoft programs installed on your computer
Answer:
Microsoft Windows 10 ... (Windows) If you accidentally delete files from your computer's hard drive, ... Upgrade to remove ads ... (Windows) Applications (or apps) in Windows 10 that you use frequently can be ... the operating system, installed programs, settings, and user files that you can later use to recover your computer.
Explanation:
Answer:
Task Manager?
Explanation:
Help it don’t let me click what do I do
Answer: Try resetting you device, or add a mouse to it.
Explanation:
Assume a system has a TLB hit ratio of 90%. It requires 15 nanoseconds to access the TLB, and 85 nanoseconds to access main memory. What is the effective memory access time in nanoseconds for this system?
Answer:
310 ns
Explanation:
Given that
TLB hit ratio = 90%
TLB hit ratio = 90/100
TLB hit ratio = 0.9
Time needed to access TLB = 15 ns
Time needed to access main Memory = 85 ns
Effective memory access time = ?.
The formula for finding the effective memory access time is given by
The effective memory access time = [TLB Hit ratio (main memory access time + required time to access TLB) + [2 * (main memory access time + required time to access TLB)] * (2 - TLB hit ratio)]
On substituting the values given in the question to the equation, we have
The effective memory access time = [0.9 (85 + 15) + [2 * (85 + 15)] * (2 - 0.90)]
The effective memory access time =
[(0.9 * 100) + (2 * 100) * 1.1]
The effective memory access time =
(90 + (200 * 1.1))
The effective memory access time =
90 + 220
The effective memory access time =
310 ns
Which is the instance variable in the given code?
public class Person{
public intpid;
private double salary;
public Person (intpersonID){
pid = personID;
}
public void setSalary(double empSal){
salary = empSal;
}
public void printDetails(){
System.out.println("id : " + pid );
System.out.println("salary :" + salary);
}
public static void main(String args[]){
Person P = new Person("P1");
P.setSalary(100);
P.printDetails();
}
}
A. public intpid;
B. private double salary;
C. intpersonID
D. double empSal
E. Person P = new Person("P1");
Answer:
Person P is a new instance of Persons class
-- located in the main class
Use the drop-down menus to complete statements about the Outlook filter option and Clutter folder.
The Filter dialog box can be accessed under the View tab and the ______
button.
The Clutter folder uses _______
filtering to divert low-priority messages.
Answer:
1. view settings
2. smart
Explanation:
In the Outlook filter option and Clutter folder, the Filter dialog box can be accessed under the View tab and the view settings button.
What is Microsoft Outlook?Microsoft Outlook can be defined as an e-mail and task management software application which is designed and developed by Microsoft Inc., so as to enable users send electronic messages, schedule and plan their work activities.
In the Outlook filter option and Clutter folder, the Filter dialog box can be accessed under the View tab and the view settings button. Also, the Clutter folder uses Smart filtering to divert low-priority messages.
Read more on Microsoft Outlook here: https://brainly.com/question/1538272
#SPJ2
Objective: Write a program that will read and parse data from a file, then make use of lists to solve a problem.
Problem: Using python, write a program that will compute the maximum possible profit for a stock trade using historical data on a selection of companies. We would like to find the maximum possible profit that we could have gained, if we had made an ideal investment (if we ever finish that time machine). We must determine the largest increase in value from the purchase date to the sell date, using historical information. We will use the daily low price to purchase and the daily high price to sell a stock. For this assignment, we will use actual freelyavailable stock data stored in .CSV (comma separated values) format from Yahoo finance. A significant part of the exercise is learning to read and parse data from files and to format output.
1. Request the name for the input data file to be used to determine the results. You will have to run your program on all of the data sets to generate the required results. If the program does not exist, print a warning message and allow the user to try again.
2. Read in all the data from the requested file and parse the data; extracting the useful bits into one or more lists.
3. Use the data to determine the largest gain possible in a stock price by comparing Low values as the purchase price and High values as the sale price.
4. Report for each stock symbol (AAPL, AMZN, GOOG, MSFT, and TSLA) the purchase and sale days, the purchase and sale prices, profit per share, and the ratio of the change in value. Enter these results as submission comments in Blackboard.
5. Continue to request file names until the user enters a blank name (empty string), then exit the program.
6. Use good functional style and suitable variable names.
7. In the submission comment, answer the question: If you could travel back in time and invest in one of the five stocks listed, which stock would you pick?
Note: Assume that you must keep stocks for at least one day, no buying and selling on the same day. The data files contain more data than is needed, be sure to use the correct values. Be sure to move the data files into the same folder as your code so that your program can find the data files.
Example Output and Results: Please enter the data file name: BLARG.csv
Error Reading data ...
The file does not exist. Please check the name and try again.
Please enter the data file name: GOOG.csv
Reading data ...
****************************************
The maximum profit is 1045.88 per share
Buy on 2015-01-12 at a price of 486.23
Sell on 2020-02-19 at a price of 1532.11
Change in value ratio: 3.151
Answer:
import csv
def stock_prof():
csvfile = input("Enter absolute path to file name")
while csvfile:
file = open(csvfile, 'r')
data = csv.DictReader(file)
profit_list = [row['High'] - row['Low'] for row in data]
print(f"The maximum profit is: {max(profit_list)}")
for row in data:
print(f"Buy on {row['Data']} at the price of {row['Low']}")
print(f"Sell on {row['Data']} at the price of {row['High']}")
print(f"Change in value ratio: {row['High']/row['Low']}")
csvfile = input("Enter filename: ")
stock_prof()
Explanation:
Assuming the CSV file is in the same directory as the python script, the user inputs the file name and uses the CSV DictReader method to read the file as an ordered dictionary, then the maximum profit is printed as well as the date to buy and sell and the change in value ratio.
Select the correct answer. Which number system consists of digits 0 to 9 and letters A to F? octal binary hexadecimal decimal
Answer:
hexadecimal
represents a radix of 16
Which of the following would a dialogue editor most likely do if an actor makes a lip smacking sound during a dialogue sequence?
A)Use an ADR
B)Review raw footage to layer over the dialogue
C)Use voice over narration
D)Remove it and replace it with another sound
Answer:
c
Explanation:
Complete each sentence to describe features of the VLOOKUP function.
The VLOOKUP function structure begins with =VLOOKUP(
To use the VLOOKUP function, the lookup value should be in the
of the table.
Answer:
Look Up Value, Table Array, First Column
Explanation:
The VLOOKUP function structure begins with =VLOOKUP(
✔ lookup value
,
✔ table array
…)
To use the VLOOKUP function, the lookup value should be in the
✔ first column
of the table.
Which of the following BEST describes personal responsibility?
1.Provides the basis for your code of ethics
2.Obeying laws that regulate how computers are used
3.Rules that support your personal values
4.How you act even if no one is watching
Answer:
3.Rules that support your personal values
Explanation:
2) - How many integers between 1 and 500 inclusive are divisible by either 2, 3, or 5?
366 numbers between 1 and 500 are divisible by 2, 3, or 5.
We can check this with the following code:
Sam is developing a software program in Python and has a question about how to implement a particular feature.
Which use of a resource is most likely to provide Sam with the best results?
joining a Python developer forum and posting a question to the forum to solicit feedback
joining a Python developer forum and following links to technical news sites
reviewing an Introduction to Computer Science textbook
reviewing the computer user manual
Answer:
The correct answer is:
"joining a Python developer forum and posting a question to the forum to solicit feedback"
Explanation:
Learning a new skill involves a lot of research and study especially learning a new programming language.
The syntax and commands have to be understood first.
Now if Sam has to implement a particular feature, the easiest and less time-consuming way is that he post his query on a Python language forum as there might be better and expert programmer that might help
Hence,
The correct answer is:
"joining a Python developer forum and posting a question to the forum to solicit feedback"
Answer:
D
Explanation:
reviewing the computer user manual
Who is least likely to be treated with somatropin?
A 3-year-old cow on a dairy farm
A 4-year-old girl with an XO genetic genotype
A 44-year-old boy with chronic renal failure and gronih deficiency
A 10-year-old boy with polydipsia and polyuria
A 10-year-old boy with polydipsia and polyuria would likely not be treated with somatropin.
This is because somatropin is often used for growth issues and even short bowel syndrome, but from what I could find, nothing about polydipsia or polyuria.
A 3-year-old cow on a dairy farm could need somatropin, specifically Bovine Somatotropin (bST) to increase milk production or fix growth issues
A 4-year-old girl with an XO genetic genotype would get somatropin because it is used to treat Turner syndrome (Same as XO genetic genotype)
A 44-year-old boy with chronic renal failure and growth deficiency would get somatropin because it is used to treat growth issues even in adults and chronic renal failure