Answer:
D. A deque i a type of collection
Explanation:
I do computer science too ;3
hello hello . please help me
Answer:
#include <iostream>
using namespace std;
int main() {
int num, check=0;
for(int num = 1; num<=100;num++){
for(int i = 2; i <= num/2; i++) {
if(num % i == 0) {
check=1;
break; } }
if (check==0) { cout <<num<<" "; }
check = 0;
}
return 0;
}
Explanation:
This line declares num as integer which represents digits 1 to 100.
A check variable is declared as integer and initialized to 0
int num, m=0, check=0;
This for loop iterates from 1 to 100
for(int num = 1; num<=100;num++){
This iterates from 2 to half of current digit
for(int i = 2; i <= num/2; i++) {
This checks for possible divisors
if(num % i == 0) {
If found, the check variable is updated to 1
check=1;
And the loop is terminated
break; } }
The following if statement prints the prime numbers
if (check==0) { cout <<num<<" "; }
check = 0;
}
Write a recursive function that accepts two arguments into the parameters x and y. The function should return the value of x times y. Hint: multiplication can be performed as repeated addition. Test your recursive function by prompting the user to enter values for x and y and then displaying the result. Your function should be able to handle multiplication of negative values.
Answer:
In Python:
def times(x,y):
if y<0:
return -1*times(x,y*-1)
if y == 1:
return x
return x + times(x,y-1)
x = int(input("x: "))
y = int(input("y: "))
print(times(x,y))
Explanation:
I answered the question using Python3
This defines the function
def times(x,y):
This checks for negative values
if y<0:
return -1*times(x,y*-1)
This is the base case where y = 1
if y == 1:
If true, the value of x is returned
return x
This returns the recursion and it is repeated until the base case is achieved
return x + times(x,y-1)
This prompts user for x value
x = int(input("x: "))
This prompts user for y value
y = int(input("y: "))
This calls the recursion and also prints the result
print(times(x,y))
A part-time job performed while in high school must have the approval of your school counselor.
False
True
Answer:
False, it only needs approval of your parents/guardian
May I have brainliest please? :)
Answer:
False
Explanation:
Professor Gig A. Byte needs to store text made up of the characters A with frequency 6, B with frequency 2, C with frequency 3, D with frequency 2, and E with frequency 8. Professor Byte suggests using the variable length codes:
Character Code
A 1
B 00
C 01
D 10
E 0
The professor argues that these codes store the text in less space than that used by an optimal Huffman code. Is the professor correct?
Answer:
This is not true
Explanation:
The optimal Huffman code is used to encrypt and compress text files. It uses fixed-length code or variable-length code for encryption and compression of data.
The professor's character code is similar to Huffman's variable-length coding which uses variable length od binary digits to represent the word strings. The file size of the text file above is;
= 6 x 1 + 2 x 2 + 3 x 2 + 2 x 2 + 8 x 1 = 28 bits
This would be the same for both cases.
The encrypt would be the problem as the encoded and decoding of the characters B and E may cause an error.
Describe one practical application of total internal reflection.
Answer:
The phenomenon of total internal reflection of light is used in many optical instruments like telescopes, microscopes, binoculars, spectroscopes, periscopes etc. The brilliance of a diamond is due to total internal reflection. Optical fibre works on the principle of total internal reflection.
Explanation:
thank me later but if it wrong. sorry
What is closed soruce nonproprietary hardware and software based on publicly known standards that allow third parties to create
Answer:
open system
Explanation:
An open system is a system that sets open-source standards and promotes the interoperability and portability standards between systems developing and running open-source programs.
An open-source application is a program in which its source code is readily available and free for public use and upgrade. Unlike closed-source, its users can add or update the features of the source code.
If you have 128 oranges all the same size, color, and weight except one orange is heavier than the rest. Write down a C++ Code/Algorithm to search the heavy orange, in how many steps would you be able to find it out?
Answer:
#include <iostream>
using namespace std;
void Search_heavy_orange(int arr[], int l, int r, int x)
{
int count = 0, m = 0;
while (l <= r) {
m = l + (r - l) / 2;
// Check if x is present at mid
if (arr[m] == x) {
count++;
}
// If x greater, ignore left half
if (arr[m] < x) {
l = m + 1;
count++;
}
// If x is smaller, ignore right half
else {
r = m - 1;
count++;
}
}
cout << "............For Worst Case......." << endl;
cout << "Orange with heavy weight is present at index " << m << endl;
cout << "Total number of step performed : " << count << endl;
}
int main()
{
// Assuming each orange is 100 gm and the weight of heavy
// orange is 150 gm
int orange_weight[128];
for (int i = 0; i < 127; i++) {
orange_weight[i] = 100;
}
// At worst case the heavy orange should be at last position
// inside the basket : 127
orange_weight[127] = 150;
// We will pass array , start index , last index and the search element
// as the parameters in the function Search_heavy_orange
Search_heavy_orange(orange_weight, 0, 127, 150);
return 0;
}
Explanation:
URGENT
You are an art director working for a feature film studio. Create a set for an interior scene of your choosing. Write a description of your scene to give to the principal production team. Include details that an art director would focus time and energy on. Include other production team members with whom you would collaborate. Your description should be at least 150 words.
Multiple Choice
Which method adds an element at the beginning of a deque?
appendleft
O insertleft
O popleft
addleft
Answer: appendleft
Explanation: Edge 2021
The method that adds an element for the information at the beginning of a deque is append left. Thus option (A) is correct.
What is an information?An information refers to something that has the power to inform. At the most fundamental level information pertains to the interpretation of that which may be sensed.
The digital signals and other data use discrete signs or alogrithms to convey information, other phenomena and artifacts such as analog signals, poems, pictures, music or other sounds, and the electrical currents convey information in a more continuous form.
Information is not knowledge itself, but its interpretation is important. An Information can be in a raw form or in an structured form as data. The information available through a collection of data may be derived by analysis by expert analysts in their domain.
Learn more about information here:
brainly.com/question/27798920
#SPJ5
How many fnaf games did Scott Cawthon make?
Answer:
8 but he is making FNaF security breach
Explanation:
there is FNaF VR help wanted
Answer:
8 or 10
Explanation:
PLS HELP For this activity, you can use the audio recorder on your cell phone or a digital camera to record the following sounds: • the sound of footsteps of someone walking towards you
• the sound of a person starting a car, rewing the engine, and driving away
• the sound of a phone ringing at home as you walk toward it the sound of somebody speaking to you as you walk toward that person
After you record these sounds from different sources, play them back and observe the differences in the recorded sound from each source. Write a note recounting your experience and observations for each of these recordings.
Answer:
So you put down what is recorded. Because every time you Play back the audio it sound's different. When you are doing the Exp. It's Called Sound waves My Friend
Explanation:
Answer:
I recorded the four types of sounds as mentioned in the question. When I played them back, they seemed to create a dramatic effect.
The footsteps sounded quite dramatic and added purpose to the activity. I recorded the sound of my sister's footsteps as she walked down the stairs in high heels and then as she walked past me. When I was recording the sound, the footsteps sounded normal. However, when I heard the recorded footsteps, the sound of the slow, approaching footsteps created a sense of mystery. Who was the person walking down the stairs? Why was the person hurrying past me? Did she achieve what she set out to do? In addition, I noticed perspective in a sound effect for the first time. It started softly and then became louder. As she moved past me and went away, it became softer again until it finally faded away.
The engine noise, and the sound of starting and driving the car, brought out the innate nature of the sound and emphasized that there is more to starting an engine than just moving the car. For instance, when the car engine started, it was clear that the driver was heading somewhere. The car's constant "vrooming" noise indicated that the driver was waiting to drive. However, the question is, "What's the rush?" The sound of the car driving away indicated that the driver finally drove away. I also noticed that the way the car drives away reveals the driver's state of mind. When the driver is in a rush and swerves and drives away at great speed, there will be drama. This is different from the peaceful, non-rushed driving style of a person going out for a drive with his or her family. The sound of people going to work will be different from the sound of people going on a holiday or going shopping on a weekend.
Walking toward a ringing phone added an element of surprise to the action. I placed the recorder near the phone and could hear myself walking toward it. When I heard the recorded sound, it sounded as though I was in no rush to pick up the ringing phone. It sounded just like any other regular action, not one filled with drama or mystery.
As I walked toward my friend while he spoke, his voice sounded louder and clearer. The effect was similar to zooming in on an image from a distance. This adds perspective to sounds and voices, and it adds depth to the visuals as well.
Explanation:
PLATO ANSWER
Write two statements that each use malloc to allocate an int location for each pointer. Sample output for given program:
numPtr1 = 44, numPtr2 = 99
#include
#include
int main(void) {
int* numPtr1 = NULL;
int* numPtr2 = NULL;
/* Your solution goes here */
*numPtr1 = 44;
*numPtr2 = 99;
printf("numPtr1 = %d, numPtr2 = %d\n", *numPtr1, *numPtr2);
free(numPtr1);
free(numPtr2);
return 0;
}
Answer:
#include <stdio.h>
#include <stdlib.h>
int main(void) {
int* numPtr1 = NULL;
int* numPtr2 = NULL;
/* Your solution goes here */
numPtr1 = (int *) malloc(10);
numPtr2 = (int *) malloc(20);
*numPtr1 = 44;
*numPtr2 = 99;
printf("numPtr1 = %d, numPtr2 = %d\n", *numPtr1, *numPtr2);
free(numPtr1);
free(numPtr2);
return 0;
}
Explanation:
The C library malloc function is used to assign memory locations (in bytes) to variables. It accepts the size parameter and returns a pointer to the specified variable location.
The two malloc statements above assign two memory locations 10 and 20 to the numPtr1 and numPtr2 integer variables respectively.
A pre-design document you can use to create a new project quickly
Answer:
13) B - Landscape and Portrait
14) C - Template
Explanation:
The two print options are known as landscape and portrait and a template is a pre-designed document.
how and when abstract classes are used in python
Answer:
A class is called an Abstract class if it contains one or more abstract methods. An abstract method is a method that is declared, but contains no implementation. Abstract classes may not be instantiated, and its abstract methods must be implemented by its subclasses.
Explanation:
So it only makes sense to use them if you plan to have preferably more than one subclass.
Learning Target: Students will work on final project.
You have leamed about video game industry and acquired basic skills to make basic
video games in this class so far. It is time to update your resume and cover letter.
Re-visit your assignments from 9/28-9/29 in this class. You can find that at your
submission in google classroom for this class for the dates mentioned. Type your
resume and cover letter using google docs or MS word professionally. First do
research to find a job opening in a real company. Craft your resume and cover letter
as if you are applying for the job listed. List game projects, coding skills etc. that
could benefit you in finding his job.
1. Check-in/Exit Ticket
2. Resume and Cover Letter
Answer:
I don't get this question
Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and an academic writing style that demonstrates your understanding of the difference between a Microsoft Access database and an Excel spreadsheet by comparing the features of each and when they would be used as personal computer applications if applicable.
Answer:
Running queries in SQL or structured query language interacts with a relational database. It is used to create new databases and tables, read the content of the database tables, update and also delete the content.
Microsoft Access is a database software but Excel is a spreadsheet application.
Explanation:
Access databases hold large datasets that can be accessed from other platforms and generate automatic query while datasets in Excel are limited but it has comprehensive statistical tools for data analysis.
i can't find my grandson someone help
Answer:
i'm right here
Explanation:
grandma
Answer:
were did u lose him.
Explanation:
JAVA...Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
CODE BELOW
public class RecursiveCalls {
public static void backwardsAlphabet(char currLetter) {
if (currLetter == 'a') {
System.out.println(currLetter);
}
else {
System.out.print(currLetter + " ");
backwardsAlphabet(--currLetter);
}
}
public static void main (String [] args) {
char startingLetter;
startingLetter = 'z';
/* Your solution goes here */
}
}
Answer:
RecursiveCalls.backwardsAlphabet(startingLetter);
Explanation:
The statement that is needed is a single-line statement. Since the class RecursiveCalls is already in the same file we can simply use that class and call its function without making a new class object. Once we call that class' function we simply pass the variable startingLetter (which is already provided) as the sole parameter for the function in order for it to run and use the letter 'z' as the starting point.
RecursiveCalls.backwardsAlphabet(startingLetter);
Suppose that the LC-3 instruction LD R1, DATA is located at x3100 in memory and the label DATA is located at x 310F. The machine code (in hex) for the above instruction is
Answer:
The machine code is located at x210F.
Explanation:
The DATA is located at x3100 while the DATA label is located at the x310F (in hex) in the memory which is F address away (8 bits) from the DATA itself. The machine code location is relative to the address of the DATA label.
Assume a file containing a series of integers is named numbers.txt and exists on the computer’s disk. Write a program that reads all of the numbers stored in the file, calculates their total and displays it.
Very Important: The file could have any number of numbers, so you need to use a loop to process the data in the file
#include <iostream>
#include <fstream>
using namespace std;
int main(){
int x, sum=0;
ifstream f("numbers.txt");
while(!f.eof()){
f >> x;
sum +=x;
}
cout << "Sum : " << sum;
}
This is a C++ program.
Next time be more precise on the programming language you want
The ____ represents units of work application software performs in terms of its demand for low-level hardware services.
Answer:
application demand model
Explanation:
explain the main components of a computer system
Answer:
A motherboard.
A Central Processing Unit (CPU)
A Graphics Processing Unit (GPU), also known as a video card.
Random Access Memory (RAM), also known as volatile memory.
Storage: Solid State Drive (SSD) or Hard Disk Drive (HDD)
Explanation:
They all work together to create a system
Which item is essential to know before sketching a navigation menu flowchart?
template specifics, such as horizontal or vertical menu layout
whether or not the site will implement a search feature
all of the pages in the site and the content each page will contain
who will be using the site and the design theme selected for them
Answer:
A, template specifics, such as horizontal or vertical menu layout
Explanation:
Answer:
D. who will be using the site and the design theme selected for them
Explanation:
I am doing the exam right now.
What is the main advantage of using a WYSIWYG (“what you see is what you get”) editor when constructing a website?
Only one programming language is required.
Websites may have more professional construction.
Knowledge of HTML is not required.
Website templates are not necessary.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer among the given options to this question is:
Knowledge of HTML is not required.
Because when you are constructing a website using WYSIWYG (“what you see is what you get”) editor, then you don't need the knowledge of HTML. Because, when you use WYSIWYG editor to insert button, table, images, text, paragraph, etc. It will automatically insert HTML code behind the page. For example, you can insert a form and a submit button using drag and drop with the help of WYSIWYG (“what you see is what you get”) editor, for this purpose, you don't need exact knowledge of HTML. WYSIWYG (“what you see is what you get”) automatically inserts the HTML for the form and button on a website page.
While other options are not correct because:
Using the WYSIWYG (“what you see is what you get”) editor, you can use different programming languages in your website, such as VB.net, Asp.Net, C#, Javascript, Bootstrap, etc. It is not necessarily that you may have more professional construction and in WYSIWYG (“what you see is what you get”) website templates are mostly used and modified using WYSIWYG editor.
Answer:
(C):Knowledge of HTML is not required.
Write a static method that takes a String and returns an integer. Return the number of characters in the passed in, String parameter.
Answer:
Explanation:
The following code is written in the Java programming language. It is a function called howBig that takes in a String as a parameter and returns an int. The function grabs the string and then detects the size of the String (number of Characters it has) and then places that number into an Integer variable called wordSize. Then it returns the variable wordSize.
public static int howBig (String myWord) {
int wordSize = myWord.length();
return wordSize;
}
Following are the Program to the given question:
Program Explanation:
Defining a class "Main".Inside a class, a method "Length" is defined that takes string variable "s" as the parameter.Inside the method, a conditional statement is defined that checks length of the string value and prints its value.In the next step, the main method is declared that calls the length method, and print its return value.Program:
public class Main //defining a class Main
{
public static int Length(String s)//defining a method getLength that takes String parameters
{
if(s==null)//defining if block that check s parameter value equal to null
{
return 0;//return 0
}
else //defining else block
{
return s.length();//using return keyword that return length of String
}
}
public static void main(String[] args) //defining a main method
{
System.out.println(Length(null));//calling method and print its value
System.out.println(Length("abcd"));//calling method and print its value
}
}
Output:
Please find the attached file.
Learn more:
brainly.com/question/19737952
A free-frame list Select one: a. is a set of all frames that are used for stack and heap memory. b. is a set of all frames that are currently unallocated to any process. c. is a set of all frames that are filled with all zeros. d. is a set of all frames that are currently being shared by at least two processes.
Answer:
b. is a set of all frames that are currently unallocated to any process
Explanation:
The free frame list is the list that used for all kind of the frames that presently non-allocated to any kind or process
Therefore as per the given situation, the correct option is b as it fits to the current situation
Hence, all the other options are wrong
So, only option b is correct
The same is to be considered
Answer:
b. is a set of all frames that are currently unallocated to any process.
Choose the correct term to complete the sentence
The ____ function removes the element with an index of zero.
1)popleft
2)leftremove
3)leftpop
Answer:
popleft
Explanation:
Answer: pop left
Explanation: got it right on edgen
What kind of number is 36A
Becky's mom is a nurse and is required to wear specific clothing to work. This clothing is called
a uniform
business casual
casual
formal business attire
Write a program that calculates the average of N integers. The program should prompt the
user to enter the value for N and then afterward must enter all N numbers. If the user enters a
negative value for N, then an exception should be thrown (and caught) with the message “ N
must be positive.” If there is any exception as the user is entering the N numbers, an error
message should be displayed, and the user prompted to enter the number again.
Answer:
def Average(num):
if num == 0:
return 0
val = 0
trueNum = num
for i in range(0, num):
try:
val += int(input("Enter value (%d out of %d): " % (i+1,num)))
except Exception as e:
print ("Error processing value. Non integer detected.")
try:
val += int(input("Enter value (%d out of %d): " % (i+1,num)))
except Exception as e:
print ("Error processing value. Non integer detected.")
print ("OMITTING value from average.")
trueNum -= 1
return val/trueNum
def main():
try:
num = int(input("Enter a value N for amount of items: "))
if num < 0:
raise(ValueError)
except ValueError:
print ("N must be positive integer.")
exit(1)
print("Average: ", Average(num))
exit(0)
if __name__ == "__main__":
main()
Explanation:
This program is written in Python to collect some integer value from the user as an upper bound of integers to be input for an average. Using this upper bound, the program checks to validate it is indeed an integer. If it not an integer, then the program alerts the user and terminates. If it is a user, the Average function is called to begin calculation. Inside the Average function, the user is prompted for an integer value repeatedly up until the upper bound. Using the sum of these values, the program calculates the average. If the user inputs a non integer value, the program will alert the user that the value must be an integer and ask again. If the user again inputs a non integer value, that iteration will be omitted from the final average. The program this prints the calculated average to the user.
Cheers.