Answer: 42 is the answer to everything and just remember, Don,t panic.
For i am the hitch hikers guide to the galaxy.
Explanation:
What is the difference between a 13 column abacus and 5 column abacus?
Answer: The difference between these two types of abaci are the number the beads.
Explanation:
have a great day or night
Answer:
The difference between these two types of abaci are the number the beads.
Explanation:
This program reads a file called 'test.txt'. You are required to write two functions that build a wordlist out of all of the words found in the file and print all of the unique words found in the file. Remove punctuations using 'string.punctuation' and 'strip()' before adding words to the wordlist.
Write a function build_wordlist() that takes a 'file pointer' as an argument and reads the contents, builds the wordlist after removing punctuations, and then returns the wordlist. Another function find_unique() will take this wordlist as a parameter and return another wordlist comprising of all unique words found in the wordlist.
Example:
Contents of 'test.txt':
test file
another line in the test file
Output:
['another', 'file', 'in', 'line', 'test', 'the']
This the skeleton for 1:
#build_wordlist() function goes here
#find_unique() function goes here
def main():
infile = open("test.txt", 'r')
word_list = build_wordlist(infile)
new_wordlist = find_unique(word_list)
new_wordlist.sort()
print(new_wordlist)
main()
Answer:
Explanation:
The following code has the two requested functions, fully working and tested for bugs. It is written in Python as is the sample code in the question and a sample output can be seen in the picture attached below.
import string
def build_wordlist(file_pointer):
words = file_pointer.read()
words = [word.strip(string.punctuation) for word in words.split()]
return words
def find_unique(word_list):
unique_words = []
for word in word_list:
if word not in unique_words:
unique_words.append(word)
return unique_words
def main():
infile = open("test.txt", 'r')
word_list = build_wordlist(infile)
new_wordlist = find_unique(word_list)
new_wordlist.sort()
print(new_wordlist)
main()
import java.util.Scanner;
public class TemperatureConversion {
public static double celsiusToKelvin(double valueCelsius) {
double valueKelvin;
valueKelvin = valueCelsius + 273.15;
return valueKelvin;
}
/* Your solution goes here */
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
double valueC;
double valueK;
valueC = 10.0;
System.out.println(valueC + " C is " + celsiusToKelvin(valueC) + " K");
valueK = scnr.nextDouble();
System.out.println(valueK + " is " + kelvinToCelsius(valueK) + " C");
}
}
Answer:
import java.util.Scanner;
public class TemperatureConversion {
public static double celsiusToKelvin(double valueCelsius) {
double valueKelvin;
valueKelvin = valueCelsius + 273.15;
return valueKelvin;
}
public static double kelvinToCelsius(double valueKelvin) {
double valueCelsius;
valueCelsius = valueKelvin - 273.15;
return valueCelsius;
}
/* Your solution goes here */
public static void main (String [] args) {
Scanner scnr = new Scanner(System.in);
double valueC;
double valueK;
valueC = 10.0;
System.out.println(valueC + " C is " + celsiusToKelvin(valueC) + " K");
System.out.println("Input Kelivin: ");
valueK = scnr.nextDouble();
System.out.println(valueK + " is " + kelvinToCelsius(valueK) + " C");
}
}
Explanation:
How can a user restore a message that was removed from the Deleted Items folder?
by dragging the item from Deleted Items to the Inbox
by dragging the item from Deleted Items to Restored Items
by clicking on "Recover items recently removed from this folder"
by clicking on the Restore button in the Navigation menu
Answer:
by clicking on "Recover items recently removed from this folder".
Answer:
c
Explanation:
KAILANGAN ANG MASIDHI AT MALAWAKANG PAGBABASA NA SIYANG MAKAPAGBUBUKAS NG DAAN SA LAHAT NG KARUNUNGAN AT DISIPLINA TULAD NG AGHAM PANLIPUNAN, SYENSYA, MATEMATIKA, PILOSOPIYA, SINING ATN IBA PA.”
Answer:
Oo, tama ka!
Brainiliest?
Select the correct answer.
Which is an aspect of structural-level design?
A.
scaling
B.
player-adjusted time
C.
difficulty level
D.
radiosity
Answer:
radiosity
Explanation:
Jason works for a restaurant that serves only organic , local produce . What trend is this business following?
Answer: Green
Explanation:
Consider the following static method, calculate.
public static int calculate(int x)
{
x = x + x;
x = x + x;
x = x + x;
return x;
}
Which of the following can be used to replace the body of calculate so that the modified version of calculate will return the same result as the original version for all values of x?
return 8 * x;
return 3 + x;
return 3 * x;
return 6 * x;
return 4 * x;
Answer:
return 8 * x
Explanation:
Given
The attached code segment
Required
Which single statement can replace the program body
From calculate(), we have:
[tex]x = x + x;\\ x = x + x;\\ x = x + x;[/tex]
The first line (x = x + x) implies that:
[tex]x=2x[/tex]
So, on the next line; 2x will be substituted for x
i.e.
[tex]x = x + x[/tex] becomes
[tex]x = 2x + 2x[/tex]
[tex]x = 4x[/tex]
So, on the third line; 4x will be substituted for x
i.e.
[tex]x = x + x[/tex] becomes
[tex]x = 4x+ 4x[/tex]
[tex]x = 8x[/tex]
In programming: 8x = 8 * x:
This means that: return 8 * x can be used to replace the body
You have just started a new job as the administrator of the eastsim domain. The manager of the accounting department has overheard his employees joke about how many employees are using "password" as their password. He wants you to configure a more restrictive password policy for employees in the accounting department. Before creating the password policy, you open the Active Directory Users and Computers structure and see the following containers and OU: eastsim Builtin Users Computers Domain Controllers Which steps must you perform to implement the desired password policy? (Select three. Each correct answer is part of the complete solution.)
Explanation:
To implement the desired password policy, you have to carry out these steps
1. An organizational unit, OU has to be created for these employees in east-sim.com
2. Since there is an organizational unit created for the accounting employees, you have to put the employees user objects in this Organizational unit.
3. Then as the administrator the next step that i would take is the configuration of the password policy, then i would link this to the already created organizational unit for these employees
CEO of Entertainment Inc. wants to keep track of performance of engagement that the company has engaged. For each customer and agent, he wants to know total number of contracts by month, and monthly contract success ratio (calculated by total number of contracts expired each month divided by total amount of contract price each month). In addition, for each customer and agent he wants to know total numbers of contracts expired each week, and total number of contracts still active each week.
Required:
Provide 4-step dimensional model in the SQL and create data warehouse solution in SQL for the dimensional model that you propose.
Answer:
How do you know how to make a dimensional model?
c Write a recursive function called PrintNumPattern() to output the following number pattern.Given a positive integer as input (Ex: 12), subtract another positive integer (Ex: 3) continually until 0 or a negative value is reached, and then continually add the second integer until the first integer is again reached.
Answer:
def PrintNumPattern(a,b):
print(a)
if (a <= 0): return
PrintNumPattern(a-b,b)
print(a)
PrintNumPattern(12,3)
Explanation:
Recursive functions are cool.
paisa pay is facilitated in which e commerce website
Answer:
The answer is "Option A".
Explanation:
The PaisaPay is the digital payment service of eBay, whereby buyers can pay sellers through credit card or Online Money Order. For quick, safe transactions or their cash back, their buyers must use PaisaPay. So, it is easier to go to eBay.co.in, was its digital payment service of eBay, whereby purchasers can charge vendors by credit card or Online Bank Transfer.
Write a Python program that asks the user for their name and then prints the name out in all uppercase and then in all lowercase letters. The output should look like this:
What is your name? Maria
Your name in all uppercase letters is: MARIA
Your name in all lowercase letters is: maria
Answer:
name = input("What is your name? ")
print("Your name in all uppercase letters is " + name.upper()
print("Your name in all lowercase letters is " + name.lower()
Explanation:
The first line takes in the user input and stores it in the variable name.
The second line concatinates the string with the variable name. Then to turn the string name to upper case i used the .upper() in built python method. and did the same thing with the .lower()
Answer:
print("What is your name?")
string = "Your name in Uppercase letters:MARIA"
print(string.upper())
string = "Your name in lowercase letters"
print(string.llower())
Why each of the six problem-solving steps is important in developing the best solution for a problem
Answer:
The Answer is below
Explanation:
Each of the six problem-solving steps is important in developing the best solution for a problem because "each of these steps guarantees consistency, as every member of the project team understands the steps, methods, and techniques to be used."
For illustration, step one defines the problem to be solved.
Step two seek to find the main or underlying issue that is causing the problem
Step three: assist in drawing the alternative ways to solve the problem.
Step four: this is where to choose the most perfect solution to the problem
Step five is crucial as it involves carrying out the actual solution selected.
Step six is the step in which one check if the solution works fine or meets the intended plan.
Hence, all the steps are vital
#include
#include
#include
#include
using namespace std;
class cypher_encryptor
{
string cypher;
public:
cypher_encryptor(string cypher)
{
this->cypher = cypher;
}
string encode(string original)
{
string result = original;
for (int i = 0; i < original.length(); i++)
{
if (original[i] == ' ') continue;
result[i] = cypher[original[i] - 'a'];
}
return result;
}
string decode(string secret)
{
string result = secret;
for (int i = 0; i < secret.length(); i++)
{
if (secret[i] == ' ') continue;
for (int j = 0; j <= 26; j++)
{
if (cypher[j] == secret[i])
{
result[i] = j + 'a';
}
}
}
return result;
}
};
class hacker
{
//Returns for each character the number of times it appears in the string
map* count_letters(string phrase)
{
// Your code starts here
// Your code ends here
}
//Returns for each count the characters that appears that number of times in the string
map>* by_counts(map counts)
{
// Your code starts here
// Your code ends here
}
public:
//Calculates the cypher using phrase as a reference and encoded
string get_cypher(string phrase, string encoded)
{
// Your code starts here
// Your code ends here
}
};
//After
Answer:
where are the answers
Explanation:
how can you stretch or skew an object in paint
Answer:
Press Ctrl + Shift + Z (Rotate/Zoom). Rotate the roller-ball control about a bit. The outer ring rotates the layer.
Explanation:
SummaryIn this lab, you complete a partially prewritten Java program that uses an array.The program prompts the user to interactively enter eight batting averages, which the program stores in an array. The program should then find the minimum and maximum batting average stored in the array as well as the average of the eight batting averages. The data file provided for this lab includes the input statement and some variable declarations. Comments are included in the file to help you write the remainder of the program.Instructions1.Ensure the file named BattingAverage.java is open.Write the Java statements as indicated by the comments.Execute the program by clicking "Run Code." Enter the following batting averages: .299, .157, .242, .203, .198, .333, .270, .190. The minimum batting average should be .157, and the maximum batting average should be .333. The average should be .2365.import java.util.Scanner;public class BattingAverage{public static void main(String args[]){Scanner s = new Scanner(System.in);// Declare a named constant for array size here.// Declare array here.// Use this integer variable as your loop index.int loopIndex;// Use this variable to store the batting average input by user.double battingAverage;// String version of batting average input by user.String averageString;// Use these variables to store the minimim and maximum batting averages.double min, max;// Use these variables to store the total and the average.double total, average;// Write a loop to get batting averages from user and assign to array.System.out.println("Enter a batting average: ");averageString = s.nextLine();battingAverage = Double.parseDouble(averageString);// Assign value to array.// Assign the first element in the array to be the minimum and the maximum.min = averages[0];max = averages[0];// Start out your total with the value of the first element in the array.total = averages[0];// Write a loop here to access array values starting with averages[1]// Within the loop test for minimum and maximum batting averages.// Also accumulate a total of all batting averages.// Calculate the average of the 8 averages.// Print the averages stored in the averages array.// Print the maximum batting average, minimum batting average, and average batting average.System.exit(0);}{
Answer:
The complete program is as follows:
import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner s = new Scanner(System.in);
final int lent = 8;
Double averages[] = new Double[lent];
int loopIndex;
double battingAverage;
String averageString;
double min, max;
double total, average;
for(loopIndex = 0;loopIndex<lent;loopIndex++){
System.out.print("Enter a batting average: ");
averageString = s.nextLine();
battingAverage = Double.parseDouble(averageString);
averages[loopIndex] = battingAverage; }
min = averages[0];max = averages[0];
total = averages[0];
for(loopIndex = 1;loopIndex<lent;loopIndex++){
if(averages[loopIndex]>=max){
max = averages[loopIndex]; }
if(averages[loopIndex]<=min){
min = averages[loopIndex]; }
total+=averages[loopIndex]; }
battingAverage = total/8;
for(loopIndex = 0;loopIndex<lent;loopIndex++){
System.out.println(averages[loopIndex]+" "); }
System.out.println("Average: "+battingAverage);
System.out.println("Minimum: "+min);
System.out.println("Maximum: "+max);
System.exit(0);
}}
Explanation:
See attachment for complete program with comments
Select the correct answer.
Which function returns the lowest value of a given set of numbers or range of cells?
A.
ROUND
B.
COUNT
C.
MAX
D.
MIN
Answer:
D. Min
Explanation:
The function below takes one parameter: an integer (begin). Complete the function so that it prints the numbers starting at begin down to 1, each on a separate line. There are two recommended approaches for this: (1) use a for loop over a range statement with a negative step value, or (2) use a while loop, printing and decrementing the value each time. student.py 1 - def countdown_trigger(begin): 2 - for begin in range(begin, 0, -1): 3 print(begin)The function below takes one parameter: a list (argument_list). Complete the function to create a new list containing the first three elements of the given list and return it. You can assume that the provided list always has at least three elements. This can be implemented simply by creating (and returning) a list whose elements are the values at the zero'th, first and second indices of the given list. Alternatively, you can use the list slicing notation. student.py 1 - def make_list_of_first_three(argument_list): 2 WN Ist = argument_list[: 3 ] return IstIn the function below, return the (single) element from the input list input_list which is in the second to last position in the list. Assume that the list is large enough. student.py 1 - def return_second_to_last_element(input_list) :
Answer:
The functions in Python are as follows:
#(1) Countdown program
def countdown_trigger(begin):
for i in range(begin,0,-1):
print(i)
#(2) List of 3
def make_list_of_first_three(argument_list):
print(argument_list[:3])
#(3) Second to last
def return_second_to_last_element(input_list):
print(input_list[-2])
Explanation:
The countdown function begins here
#(1) Countdown program
This defines the function
def countdown_trigger(begin):
This iterates through the function
for i in range(begin,0,-1):
The prints the list elements
print(i)
The list of 3 function begins here
#(2) List of 3
This defines the function
def make_list_of_first_three(argument_list):
This prints the first 3 elements
print(argument_list[:3])
The second to last function begins here
#(3) Second to last
This defines the function
def return_second_to_last_element(input_list):
The prints to second to last list element
print(input_list[-2])
PLZ HELP I DIDNT MEAN TO CLICK THAT ANSWR I NEEDD HELP
Answer:
c.scheduling is the answer
PLEASE HELP WILL MARK BRAINLEST!!
What are some inadvertent effects of technology?
Answer:
Industrialization increased our standard of living, but has led to much pollution and arguably, even some social ills. The benefits brought by the internet are too many to mention, yet viral misinformation, vast erosion of privacy, and the diminishing patience of society as a whole were all unintended consequences.
Answer:
It has also increased idle time of workers
It is also true that we are now spending more time visiting social networking sites, rather than our friends and family
Explanation:
Which sequence represents the hierarchy of terms, from smallest to greatest?
Select one:
a. Database, table, record, field
O
b. Field, record, table, database
c. Record, field, table, database
d. Field, record, database, table
The sequence that stands for the hierarchy of terms, from smallest to greatest is Field, record, table, database
What is database?A database is known to be a kind of organized group of structured information, or data, that are known to be stored in a computer system.
Therefore, The sequence that stands the hierarchy of terms, from smallest to greatest is Field, record, table, database
Learn more about database from
https://brainly.com/question/26096799
#SPJ9
Define a single function named displayResults that returns nothing and takes two input parameters, an array of counters and the singular counter for the number of doubles rolled. The function displays the estimated probability of rolling doubles as well as the estimated probability of rolling each of the potential values from 1 to the maximum number that can be rolled (which can be calculated from the aforementioned input parameters). Recall, estimated probability is the calculated estimate of the theoretical probability of a scenario. To calculate an estimated probability we take the number of occurrences for a scenario and divide by the number of possible occurrences (the number of simulations).
Answer:
The function in Java:
public static void displayResult(int outcomes[], int n){
System.out.println("Occurrence\tEstimated Probability");
for(int x : outcomes){
double prob = x/(double)n;
prob = Math.round(prob * 100000.0) / 100000.0;
System.out.println(x+"\t\t"+prob);
}
}
Explanation:
See attachment 1 for complete question
This defines the function
public static void displayResult(int outcomes[], int n){
This prints the header
System.out.println("Occurrence\tEstimated Probability");
This iterates through the outcomes
for(int x : outcomes){
This calculates the probability
double prob = x/(double)n;
The probability is then rounded to 5 decimal places
prob = Math.round(prob * 100000.0) / 100000.0;
This prints each occurrence and the estimated probability
System.out.println(x+"\t\t"+prob);
}
}
See attachment 2 for complete program which includes the main
PLZ HELP !!!!!
plzzzz
Answer:
Producers
Explanation:
Producers manufacture and provide goods and services to consumers.
What can relaxation help to reduce?
body image
stress
self-control
self-respect
Type the correct answer in the box. Spell all words correctly.
Before a new email application could be released to the public, it was released for a few days to some account holders of a website. The project team then collected feedback from this limited number of users and later made the email application available for public use. What type of testing did the project team use?
The project team used ____ testing for the email application.
Answer:
Business format franchise or Business Brokers
Explanation:
Define a function named sum_values with two parameters. The first parameter will be a list of dictionaries (the data). The second parameter will be a string (a key). Return the sum of the dictionaries' values associated with the second parameter. You SHOULD NOT assume that all of the dictionaries in the first parameter will have the second parameter as a key. If none of the dictionaries have the second parameter as a key, your function should return 0. Sample function call: sum_values(data, 'estimated_annual_kwh_savings') sum_values_by_year
Answer:
Answered below
Explanation:
//Program is written in Python
sum = 0
def sum_of_values(dict_data, number_of_boys):
for dict in dict_data:
for key in dict.keys():
if key == number_of_boys:
sum += dict[key]
//After looping check the sum variable and //return the appropriate value.
if sum != 0:
return sum
elif sum == 0:
//There was no key of such so no addition.
return 0
Remember partially filled arrays where the number of elements stored in the array can be less than its capacity (the maximum number of elements allowed). We studied two different ways to represent partially filled arrays: 1) using an int variable for the numElems and 2) using a terminating value to indicate the end of elements called the sentinel value. In the code below, please fill in the details for reading values into the latter type of array that uses a sentilnel value. Don't forget to complete the printArray function.
#include
using namespace std;
void printArray(int array[]);
// Implement printArray as defined with one array parameter
int main()
{
const int CAPACITY=21;
int array[CAPACITY]; // store positive/negative int values, using 0 to indicate the end of partially filled array
cout <<"Enter up to " << CAPACITY-1 << " non-zero integers, enter 0 to end when you are done\n";
//To do: Write a loop to read up the int values and store them into array a.
// Stop reading if the user enters 0 or the array a is full.
//To do: store 0 to indicate the end of values in the array
//Display array function
printArray(array);
return 0;
}
// To do: implement display for the given array
void printArray(int array[])
{
}
Answer:
Complete the main method as follows:
int num;
cin>>num;
int i = 0;
while(num!=0){
array[i] = num;
cin>>num;
i++;
}
Complete the printArray function as follows:
void printArray(int array[]){
int i =0;
while(array[i]!=0){
cout<<array[i]<<" ";
i++;
}}
Explanation:
Main method
This declares a variable that gets input from the user
int num;
This gets input from the user
cin>>num;
This initializes a count variable to 0. It represents the index of the current array element
int i = 0;
while(num!=0){
This inserts the inputted number to the array
array[i] = num;
This gets another input
cin>>num;
The counter is incremented by 1
i++;
}
The above loop is repeated until the users enters 0
printArray method
This declares the array
void printArray(int array[]){
This initializes a counter variable to 0
int i =0;
This is repeated until array element is 0
while(array[i]!=0){
Print array element
cout<<array[i]<<" ";
Increase counter by 1
i++;
}}
See attachment for complete program
If we need to manage a contiguous range of memory, handling requests to allocate various sized chunks, and later make those chunks free for reuse (as the malloc() and free() routines do in a C program), we have a number of linked list allocation algorithms that we could choose from. If our primary objective in allocating a chunk was to leave the smallest fragment possible after the allocation, which algorithm would we implement?a. slab allocator.b. worst-fit allocator.c. first-fit allocator.d. best-fit allocator.e. bit-map allocator.
Answer:
brst fyr aligarotr
Explanation:
Do you think renewable energy can power the world?
Answer: think that the author chose to tell these two stories because they contrast each other perfectly. They show the two sides of Chicago during the time and reinstate the idea of the White City and the Black City. A common theme in the book is good vs. evil and the telling these two stories is almost a perfect depiction of it during the time period. I believe that both of these stories must have been told in order for the author to get his message across. On one side, the Fair represents the growing prosperity and magnificence of all of its wonders it beholds. On the other side, the author shows the crime, poverty, and darkness of Chicago. These two stories symbolize the truth behind the world. If the fair was told, we would be missing the fact that not everything was as great as what people thought it would be. Behind all the extravagance of the fair lies its complete opposite. If the author just told the Holmes’s story, we would lose the other point. Not everything was terrible in Chicago. Although there was crime and poverty, this was an era of innovation and technology and a feeling of growth and prosperity as well. I believe that the author chose to use these two stories to show that in reality, there are both good and bad things. Nothing can be perfect, and this is shown in the construction of the fair and the crime that happened on the side. However, the opposite cannot be said as well. This is the beauty of the world as there is always hope and room for improvement. I think that the author wanted to show us the balance between good and evil using these two instances in history. Although I found the Holmes plot slightly more interesting, I believe that both stories must have been there in order for the author to have gotten his true meaning across.
Explanation: