complete this program that runs a simulation of rolling a pair of dice 100 times and keeps track of how often doubles were rolled. after the simulation, the program should tell the user how many doubles were rolled. for example:

Answers

Answer 1

Either of that player's subsequent three turns in jail if they roll a double. If a player is successful in doing so, they move forward the number of spaces indicated by the throw right away. The player DOES NOT roll again even if doubles are rolled.

The likelihood of rolling a double 6 is what?

In a single roll of two dice, the chance of getting a double-six is 1/36 or 0.028. the chance (3%) that every throw will result in a double-six.

To know more about doubles visit;

https://brainly.com/question/29848110

#SPJ4

Answer 2

If the player rolls a double, one of their next three turns will be spent in jail. If a player succeeds in doing so, they immediately advance the amount of spaces indicated by the throw. Even if doubles are rolled, the player DOES NOT roll again.

What is the probability of rolling a double 6?

The probability of rolling a double-six on a single two-dice roll is 1/36 or 0.028. the possibility (3%) that each throw will produce a double-six.

How is doubles determined?

The probability is computed by dividing the total number of possible outcomes by the number of possible ways the event might occur. Probability and odds are two distinct ideas. Odds are calculated by dividing the likelihood that something will occur by the likelihood that.

To know more about doubles visit;

brainly.com/question/29848110

#SPJ4


Related Questions

as a binary tree, a heap is ....... ? group of answer choices full and complete. neither full nor complete. not full but complete. full but not complete.

Answers

As a binary tree, a heap is binary. A rooted tree with at most two children per node is referred to as a binary tree, sometimes known as a plane tree.

A (non-empty) binary tree is represented by the tuple (L, S, R), where L and S are singleton sets that contain the root and L and R are binary trees or the empty set. The binary tree can also be the empty set, according to certain writers. The binary (and K-ary) trees that are described here are arborescences from the viewpoint of graph theory. Thus, a binary tree may alternatively be referred to as a bifurcating arborescence, a word that dates back to very early programming manuals, before the current computer science jargon took hold. A binary tree can also be seen as an undirected graph rather than a directed graph, in which case it is an ordered, rooted tree. Some authors prefer to stress the fact that the tree is rooted by using the term rooted binary tree rather than binary tree, however as previously stated, a binary tree is always rooted. An ordered K-ary tree, where K is 2, is a special example of a binary tree. The definition of a binary tree in mathematics might vary greatly from one source to the next. Others define it as every non-leaf having exactly two offspring, without necessarily ordering the children (as left/right) and using the concept that is frequently used in computer science.

Learn more about binary tree here

https://brainly.com/question/16644287

#SPJ4

are web-based journals in which writers can editorialize and interact with other internet users.

Answers

Blogs. Weblogs, often known as blogs, are frequently updated online pages used for personal or professional material.

What a blog means?A blog, often known as a weblog, is a frequently updated online page that is used for commercial or personal comments. A area where readers can leave comments is usually included at the bottom of each blog article because blogs are frequently interactive.Most blogs are written in a conversational tone to show the author's personality and viewpoints. Some companies utilise blogs to reach out to their target markets and sell products.Weblogs, which were webpages with a series of entries arranged in reverse chronological order so that the most recent posts were at the top, were the precursor to the term "blog." They were often updated with fresh data on many subjects.

To learn more about Blogs refer :

https://brainly.com/question/10893702

#SPJ4

listen to exam instructions you have just installed a video card in a pcie expansion slot in your windows workstation. you have made sure that the card is connected to the power supply using an 8-pin connector. you also have your monitor connected to the video card. however, when you boot your workstation, it displays a blank screen instead of the windows system. which of the following is the most likely cause of the problem?

Answers

For those with sophisticated data requirements, including data scientists, CAD experts, researchers, media production teams, graphic designers, and animators, Windows 10 Pro for Windows Workstations is the ideal solution.

What distinguishes a PC from a workstation?

A workstation features superior specs than a regular PC, such as a faster CPU and GPU, more memory, more storage, software certification, and the ability to withstand continuous operation. It is also more robust. The CPU does not have to do visual tasks twice because they typically have distinct GPUs.

Which of the following is the main reason why Windows displays are black?

We'll examine a few potential causes of a blank or black screen: issues with your screen or monitor's connection. updating display adapter drivers problems. recent system problems.

To know more about Windows Workstations visit:-

https://brainly.com/question/17164100

#SPJ4

your organization is planning to deploy a new e-commerce website. management anticipates heavy processing requirements for a back-end application used by the website. the current design will use one web server and multiple application servers. additionally, when beginning a session, a user will connect to an application server and remain connected to the same application server for the entire session. which of the following best describes the configuration of the application servers?

Answers

Multiple application servers are being used in the design to distribute the load. Due to the large processing demands in this case, it is clear that numerous servers will be used, and load balancing accomplishes this.

Explain about the application servers?

A contemporary type of platform middleware is an application server. It is system software that sits between the operating system (OS) on the one hand, the external resources (such a database management system [DBMS], communications, and Internet services) on the other hand, and the user applications on the third.

When executing web applications, application servers offer a framework for their development and deployment as well as a number of services. These services include, among others, security, transactions, performance-enhancing clustering, and diagnostic tools.

The term "desktop platform applications" refers to software that may be used with desktop operating systems like macOS, Windows, Linux, etc. applications that run on mobile platforms and mobile operating systems, such as Android, iOS, Blackberry OS, etc.

To learn more about application servers refer to:

https://brainly.com/question/14922758

#SPJ4

You are watching a movie on your Smart TV using a streaming media service. Every few minutes, a message is displayed on the TV stating that the movie is buffering. Why might this be happening, and what can you do to resolve this issue?

Answers

Since you are watching a movie on your Smart TV using a streaming media service. the reason that this might be happening is because:

Internet connection: A slow or unstable internet connection can cause buffering issues while streaming movies. To resolve this, you can try restarting your router or modem, or contacting your internet service provider for assistance.

Device performance: The device you are using to stream the movie (e.g., Smart TV, streaming media player, etc.) may not have sufficient processing power or memory to handle the high-quality video stream. Updating the device's firmware or resetting the device may help resolve this issue.

What is the streaming issues about?

There are several real reasons why a movie might be buffering while being streamed on a Smart TV:

Content provider: The streaming service or content provider may be experiencing issues on their end, which can cause buffering issues for users. In this case, there may not be much you can do except wait for the issue to be resolved.

Other devices on the network: Other devices connected to the same network as the device you are using to stream the movie may be using up bandwidth, causing the movie to buffer. Disconnecting other devices or using a network management tool can help resolve this issue.

Lastly, Quality of service: The streaming service may be configured to automatically adjust the video quality based on the available internet connection speed. If your internet connection is slow, the movie may be streamed at a lower quality, which can cause it to buffer. You may be able to resolve this issue by reducing the quality of the video stream or by upgrading your internet plan to one with higher speeds.

Learn more about  buffering from

https://brainly.com/question/29708908

#SPJ1

Consider the following C++ skeletal program: class Big { int i; float f; void funi () throw float { try { throw i; throw f; } catch (int) { ... } ----- 1 } } class Small { int j; float gi void fun2() throw float { try { try { Big.funi (); throw j; throw g; } catch (int) { } <------ 2 } catch (float) { } <------ 3 } } In each of the throw statements, which catch handles the exception - 1, 2, 3, or none? Note that fun1 is called from fun2 in class Small. 7. throw i; 1 2 3 none 8. throw f; 1 2 3 none 9. throw j; 1 2 3 none 10. throw g; 1 2 3 none

Answers

In C/C++, a long long int can only contain a maximum of 20 digits. The problem is how to store the 22-digit number because no simple type makes this easy.

To solve this kind of issue, let's develop a new data type called BigInt. This article uses the new data type with a few basic operations.

'#include bits/stdc++.h'

using namespace std;

class BigInt{

   string digits;

public:

    //Constructors:

   BigInt(unsigned long long n = 0);

   BigInt(string &);

   BigInt(const char *);

   BigInt(BigInt &);

    //Helper Functions:

   friend void divide_by_2(BigInt &a);

   friend bool Null(const BigInt &);

   friend int Length(const BigInt &);

   int operator[](const int)const;

Learn more about operations here-

https://brainly.com/question/28335468

#SPJ4

Under which of these conditions should method overloading be used?: *
A) When you want to override the functionality of an inherited method with another one having the same name
B) When the methods have different parameter names
C) When the methods have similar behavior but they differ in their arity or parameter types
D) Two methods with the same name will cause a compilation error

Answers

B! I hope this helps!

Suppose a computer running TCP/IP (with IPv4) needs to transfer a 12 MB file to a host. a. [4 pts] How many megabytes, including all of the TCP/IP overhead, would be sent? Assume a payload size of 64 bytes. b. [2 pts] What is the protocol overhead, stated as a percentage? c. [4 pts] How small would the overhead have to be in KB for the overhead to be lowered to 10% of all data transmitted?

Answers

In general, though, we can expect that the total amount of data transmitted, including TCP/IP overhead, would be greater than the 12 MB of the original file.  As above, it is not possible to accurately determine the protocol overhead without knowing more specific information about the implementation and network conditions. However, in general, we can expect that the protocol overhead would be a relatively small percentage of the total data transmitted.Again, it is not possible to accurately answer this question without knowing more information about the specific implementation of TCP/IP and the network conditions. The amount of overhead added by TCP/IP can vary greatly depending on the factors mentioned above, so it is not possible to determine how small the overhead would need to be in order to lower it to 10% of the total data transmitted.

TCP/IP includes several layers of protocol overhead, and the amount of overhead added to the data being transmitted can vary based on factors such as network congestion and the size of the payload. In general, though, we can expect that the total amount of data transmitted, including TCP/IP overhead, would be greater than the 12 MB of the original file.

Learn more about TCP/IP, here https://brainly.com/question/27742993

#SPJ4

you work as the it administrator for a small corporate network. several coworkers in the office need your assistance with their windows systems. in this lab, your task is to com

Answers

Configure Windows to your liking. alter the computer's boot sequence. If you're attempting to start your computer from a disc, make the CD, DVD, or disc drive the first boot device.

What is an operating system's configuration?

The OS configuration is typically linked to a processor or partition. Different OS configurations can be used simultaneously on each processor. OS configurations come in two different flavors. There may be one or more EDTs present in an MVS OS system.

What does Windows configuration entail?

A system for troubleshooting Microsoft Windows is called Microsoft System Configuration, or MSConfig. To help pinpoint the source of the issue with the Windows system, it can re-enable or disable the software, device drivers, and Windows programs that run during startup.

To know more about Configure Windows visit :-

https://brainly.com/question/13518799

#SPJ4

tim's laptop was recently upgraded to windows 11 but is now running more slowly due to the increased memory requirements. he has decided to install some additional ram to speed up the laptop. which of the following should he install?

Answers

We can Increase RAM speed By doing Some work.

What makes a laptop’s RAM or processor faster?

A faster CPU will aid with things like streaming and running numerous apps. Simultaneously, huge quantities of RAM will aid in multitasking while essentially improving performance in complicated applications and tasks.

Start your computer again. Restarting your computer is the first thing you may attempt to free up RAM, Update Your Software, Use a Different Browser, Clear Your Cache, Uninstall Browser Extension,  Monitor Memory and Clean Up Processes, Disable unnecessary startup programs, Turn off background apps.

The topic of whether RAM speed matters is more pressing today, because Intel’s 12th-generation Alder Lake CPUs will be available in late 2021 and will support both DDR4 and DDR5 RAM. DDR4’s official highest clock speed was 3200MHz, but DDR5 starts at 4800MHz, a 50% increase.

To learn more about RAM speed refer:

https://brainly.com/question/271859

#SPJ4

according to the zippo standard, websites that provide information but do not provide the opportunity to conduct online transactions are deemed to be passive and do not create personal jurisdiction over the defendant company that operates the site.

Answers

According to the zippo standard, websites that provide information but do not provide the opportunity to conduct online transactions are deemed to be passive and do not create personal jurisdiction over the defendant company that operates the site is false.

What does the Zippo case represent?

A 1997 ruling with the iconic Internet case name Zippo Manufacturing Company v. Zippo Dot Com, Incorporated seemed to provide some solace in that environment. This choice created the categories of active, passive, and interactive Internet activity.

An "active" defendant is one who consciously uses the Internet extensively, such as when it signs contracts with citizens of another country that require frequent transmission of computer files over the Internet.

Therefore, the Zippo" Websites can be rated using Zippo's "continuum," or sliding scale, and are divided into one of three groups: either passively, actively, or as an inherent part of the defendant's enterprise.

Learn more about transactions  from

https://brainly.com/question/1016861
#SPJ1

See full question below

according to the zippo standard, websites that provide information but do not provide the opportunity to conduct online transactions are deemed to be passive and do not create personal jurisdiction over the defendant company that operates the site. true or false

you will write the code segment for the body of the method getplayer2move, which returns the number of coins that player 2 will spend in a given round of the game. in the first round of the game, the parameter round has the value 1, in the second round of the game, it has the value 2, and so on. the method returns 1, 2, or 3 based on the following rules. if round is divisible by 3, then return 3. if round is not divisible by 3 but is divisible by 2, then return 2. if round is not divisible by 3 and is not divisible by 2, then return 1.

Answers

Player 2 will always use the same tactic in the scenario. By providing the appropriate value to the result that will be returned, the method getPlayer2Move below is finished.

You will create the method getPlayer2Move, which returns how many coins Player 2 will use in a certain game round. The parameter round has a value of 1 in the first round of the game, 2 in the second round, and so on.

#include

using the std namespace;

getplayer2move bool (int x, int y, int n)

{

dp[n + 1] int;

dp[0] = untrue

If dp[1] is true,

i++ for (int I = 2; I = n);

If both!dp[i - 1] and I - 1 >= 0)

If dp[i] is true,

Alternatively, if (i-x >= 0 and!dp[i-x])

If dp[i] is true,

If I - y >= 0 and!dp[i - y]), then

If dp[i] is true,

else

dp[i] = untrue;

}

deliver dp[n];

}

the main ()

{

When (findWinner(x, y, n))

cout << 'A';

else

cout << 'B';

deliver 0;

}

Know more about namespace here:

https://brainly.com/question/13108296

#SPJ4

Assume the following statement appears in a program:mylist = []Which of the following statements would you use to add the string 'Labrador' to the list at index 0?

Answers

Program to add a string to the first position of a list. An image of the python code and the screen output of the algorithm are attached. The answer is: "mylist.append("Labrador")" or "mylist.append(s)" where s = "Labrador".

Python code

if __name__ == '__main__':

   # Define variables

   s = str()

   s = "Labrador"

   mylist=[]

   # Adding string to mylist

   mylist.append(s)

   # Output

   print(mylist[0])

To learn more about lists in python see: https://brainly.com/question/13480595

#SPJ4

Finding outliers in a data set. Detecting unusual numbers or outliers in a data set is important in many disciplines, because the outliers identify interesting phenomena extreme events, or invalid experimental results. A simple method to check if a data value is an outlier is to see if the value is a significant number of standard deviations away from the mean of the data set. For example, X is an outlier if Xx - wxl > Nox where wx is the data set mean, ox is the data set standard deviation, and is the number of standard deviations deemed significant. Assign outlierData with all values in userData that are numberStd Devs standard deviations from userData's mean. Hint: use logical indexing to return the outlier data values. Ex: If userData is [9.50, 51, 49, 100 ) and numberStd Devs is 1, then outlierData is (9.100) Function Save C Reset D MATLAB Documentation 1 function outlierData = getOutliers(userData, numberStdDevs) 2 % getOutliers: Return all elements of input array data that are more than 3 % numStdDevs standard deviations away from the mean. 4 5 % Inputs: userData - array of input data values 6 % numberStdDevs - threshold number of standard deviations to determine whether a particular data value is an outlier * Outputs: outlierData - array of outlier data values Assign dataMean with the mean of userData dataMean = 0; Assign dataStdDev with userData's standard deviation dataStdDev = 0; % Assign outlierData with Return outliers outlierData = 0; 21 end Code to call your function C Reset 1 getOutliers (19, 50, 51, 49, 100, 1)

Answers

To assign outlierData with all values in userData that are numberStd Devs standard deviations from userData's mean, check the given code.

What is standard deviation?

A statistic known as the standard deviation, which is calculated as the square root of variance, gauges a dataset's dispersion from its mean. By figuring out how far off from the mean each data point is, the standard deviation can be calculated as the square root of variance.

A higher deviation exists within a data set if the data points are further from the mean; consequently, the higher the standard deviation, the more dispersed the data.

//CODE//

function outlierData = getOutliers(userData, numberStdDevs)

   dataMean = mean(userData);

   dataStdDev = std(userData);

   outlierData=userData(abs(userData-dataMean)>numberStdDevs*dataStdDev);

end

Learn more about standard deviation

https://brainly.com/question/475676

#SPJ4

this pricing strategy is appropriate for selling the product that cannot be used without a companion product (e.g., computer software

Answers

Product line pricing is the pricing for captive products. It alludes to a tactic used to draw customers to the primary item.

What are companion product?Pharmacies seek out companion products—items that meet demands beyond and in addition to those served by the original product—in order to boost non-prescription revenue. tissues might be taken with antibiotics prescribed by a doctor, or tissues could be taken along with cold and flu drugs.Companion selling, also known as cross-selling or suggested selling, is a strategy used by salespeople to combine and sell goods and services across subcategories. As an illustration, work gloves might be offered for sale as a companion item with other personal safety equipment.A person who frequently joins, is associated with, or goes somewhere with another person: my son and his two buddies. a person hired as a helpful buddy to travel with, look after, or live with another.

To learn more companion product about refer to:

brainly.com/question/462246

#SPJ1

Suppose TCP Tahoe is used (instead of TCP Reno), and assume that triple
duplicate ACKs are received at the 16th round. What are the ssthresh and the
congestion window size at the 19th round?

Answers

At the 16th round, when the triple duplicate ACKs are received, the ssthresh value is set to half of the current congestion window size.

This means that the ssthresh value at the 16th round is half of the congestion window size at the 16th round (i.e., W16). Thus, ssthresh at the 16th round = W16/2.

Congestion Window Size:

At the 19th round, the congestion window size is set to ssthresh + 3 × MSS, where MSS is the maximum segment size. Therefore, the congestion window size at the 19th round = ssthresh + 3 × MSS.

Thus, the ssthresh and the congestion window size at the 19th round can be calculated as follows:

ssthresh at the 19th round = W16/2

Congestion window size at the 19th round = (W16/2) + 3 × MSS

For more questions like Congestion window click the link below:

brainly.com/question/15098773

#SPJ4

you have 3 pairs of pants or skirts, 4 shirts or blouses, and 5 pairs of shoes. you can use them to wear different outfits. you are a participant in a peace conference with 10 participants. everybody shakes everybody else's hand. there are handshakes altogether. a family of five is taking an extended vacation. every day at lunch they stand in line at a cafeteria in a different order than ever before. on the last day, however, they can't help repeating a previous order. their vacation lasted days

Answers

1) There are 60 different ways to pair pants, shirts, and shoes altogether. 2) There were 45 handshakes overall. 3) The 120-day trip was taken by the family.

Combinatorics, a branch of discrete mathematics, is based on combinations and permutations. In combinatorics, the only operation is counting. Counting seems straightforward at first. It should come as no surprise that it was the first sort of mathematics taught in school. It turns out that counting is very non-trivial, and there are currently a huge number of outstanding combinatorial problems that mathematicians are trying to answer.

Combinations are any unordered subsets of the given set of n unique pairs with size rn. "N select r" means that "n separate things can be combined in n unique ways to make n number of combinations of size r," without repetition. Some sources may substitute nCr in its place.

Know more about subsets here:

https://brainly.com/question/28705656

#SPJ4

you want to set up a service on your company network that can be configured with a list of valid websites. the service should give employees a certificate warning if they try to visit a version of an untrusted site.

Answers

When a browser declares a certificate to be untrusted, it either indicates that the certificate cannot be linked to a trusted root certificate or that it was not signed by a trusted root certificate.

What is an untrusted site?

If a browser reports a certificate as untrusted, it signifies that it isn't signed by a trusted root certificate or that it can't be linked to a trusted root certificate.

Avoid downloading software from unreliable sources or accessing unknown websites. These websites frequently host malware that will automatically install on your computer (sometimes covertly) and compromise it. Avoid clicking on any links or attachments in emails that are unexpected or questionable for any reason.

When a web browser is unable to validate the SSL certificate that has been put on a website, an SSL certificate error occurs. An error notice alerting users that the site might not be safe will be shown by the browser rather than connecting users to your website.

To learn more about  untrusted site refer to:

https://brainly.com/question/30029128

#SPJ4

A formula for finding the greatest common divisor (GCD) of two numbers was formulated by the mathematician Euclid around 300 BCE. The GCD of two numbers is the largest number that will divide into both numbers without any remainder. For example, the GCD of 12 and 16 is 4, the GCD of 18 and 12 is 6.
The basic algorithm is as follows:
Assume we are computing the GCD of two integers x and y. Follow the steps below:
1. Replace the larger of x and y with the remainder after (integer) dividing the larger number by the smaller one.
2. If x or y is zero, stop. The answer is the nonzero value.
3 If neither x nor y is zero, go back to step 1.
Here is an example listing the successive values of x and y:
x y
135 20 %(135 / 20) = 15
15 20 %(20 / 15) = 5
15 5 %(15 / 5) = 0 0 5 GCD = 5 Write a recursive method that finds the GCD of two numbers using Euclid’s algorithm.
public class Arithmetic
{
public static int gcd(int a, int b)
{
// Your work here
}

Answers

The Java application may quickly and easily implement Euclid's approach using recursion to find the GCD of two numbers.

Simple Java application for determining the greatest common factor, greatest common divisor, or highest common factor (Highest common factor). The greatest positive integer that evenly divides both integers, leaving no leftover, is the GCD of two numbers. There are other ways to determine the GCD, GDF, or HCF of two numbers, but Euclid's procedure is well known and simple to grasp—but only if you get how recursion works. The Java application may quickly and easily implement Euclid's approach using recursion to find the GCD of two numbers. The GCD of two numbers, a, b, is equivalent to GCD(b, a mod b) and GCD(a, 0) = a, according to Euclid's technique.

Know more about Java here:

https://brainly.com/question/12978370

#SPJ4

participation activity 5.5.2: multiple arrays. 1) using two separate statements, declare two related integer arrays named seatposition and testscore (in that order) each with 130 elements. C++

Answers

Finding the intersection of two arrays and storing that intersection in a temporary array before searching for the intersection of the third array and temporary array is a straightforward approach.

This solution's time complexity is O(n1 + n2 + n3), where n1, n2 and n3 are the corresponding sizes of ar1[], ar2[] and ar3[].

The common elements can be found using a single loop and without the need for extra space, unlike the above solution that uses extra space and two loops. The concept is comparable to how two arrays intersect. We traverse three arrays in a loop similar to two arrays looping. Let x, y, and z represent the current elements being traversed in ar1, ar2, and ar3, respectively. The following scenarios are possible inside the loop.

Learn more about array here-

https://brainly.com/question/19570024

#SPJ4

one of benefits of this type of data entry is that it is easy to determine if the data are complete. a. Big data
b. Structured data
c. Aggregate data
d. Unstructured data

Answers

One of the benefits of this type of data entry is that it is easy to determine if the data are complete is structured data

What is a structured data?

Excel spreadsheets and SQL databases are typical instances of structured data. Each of them has structured, sortable rows and columns. A data model, which is a representation of how data can be stored, processed, and accessed, is necessary for the existence of structured data.

A data model, which is a representation of how data can be stored, processed, and accessed, is necessary for the existence of structured data. Each field is discrete and can be accessed independently or in conjunction with data from other fields thanks to a data model. Because it is feasible to swiftly aggregate data from many areas in the database, structured data is incredibly powerful.

Since the first database management systems (DBMS) could store, handle, and access structured data, structured data is regarded as the most "conventional" kind of data storage.

Hence to conclude the structured data is necessary for the data entry if the data is incomplete

To know more on structured data follow this link:

https://brainly.com/question/28583901
#SPJ4

which of the following is not true when editing an existing macro to add a button to the quick access toolbar?

Answers

In order to add a button to the fast access toolbar when changing an existing macro on a computer with a touch screen, the Touch/Mouse mode button displays are not always accurate.

An information processing and storing device is a computer. To perform functions like data storage, algorithm computation, and information display, the majority of computers rely on a binary system, which uses the two variables 0 and 1. From portable cellphones to supercomputers weighing more than 300 tonnes, there are numerous diverse shapes and sizes of computers.

Now nearly generally used to describe automated electrical technology, the term "computer" originally referred to a person who performed calculations. The design, construction, and uses of contemporary digital electronic computers are the main topics of the first section of this article. The evolution of computing is discussed in the second part. See computer science for more information on computer theory, software, and architecture.

Learn more about computer here:

https://brainly.com/question/13396316

#SPJ4

______is not a legal variable name in Python?
.apple
• apple1
. apple_1
• 1apple

Answers

Answer:

apple_1

Explanation:

In python the variable name must start with an alphabetic or the underscore character

Part 2a. Write this definition in Prolog and add it to library.pl : /* getoverdue(Who, Today, ItemList) calculates Itemlist, which is a list of KEYs of all the items Who has borrowed that are overdue as of Today. */ Hint: your answer will look a lot like getBorrowed 's definition. Test your coding on at least these examples: ?- get0verdue('Homer', 25, List). List=[k2,k4]. ?- get0verdue('Lisa', 25, List). List=[]. ?- get0verdue((−,50, List). List=[k2,k4,k3,k0]. Copy your test cases and their outputs into the txt file, library.txt .

Answers

Programmation en Logique (Programming in Logic) or Prolog is a high-level programming language that has its roots in first-order logic or first-order predicate calculus.

What is high level programming language?A high-level language (HLL) is a programming language, such as C, FORTRAN, or Pascal, that allows a programmer to write programs that are independent of the type of computer. Such languages are considered high-level because they are more similar to human languages than machine languages.Assembly languages, on the other hand, are considered low-level because they are so close to machine languages.The first high-level programming languages were designed in the 1950s. Now there are dozens of different languages, including Ada, Algol, BASIC, COBOL, C, C++, FORTRAN, LISP, Pascal, and Prolog.

To learn more about Assembly languages  refer to:

https://brainly.com/question/13171889

#SPJ4

Consider the following code that adds two matrices A and B and stores the result in a matrix C:
for (i= 0 to 15) {
for (j= 0 to 31) {
C[i][j] = A[i][j] + B[i][j];}}
Two possible ways to parallelize this loop is illustrated below:
(a) For each Pk in {0, 1, 2, 3}:
for (i = 0 to 15) {
for (j = Pk*7 + Pk to (Pk+1)*7 + Pk){
// Inner Loop Parallelization
C[i][j] = A[i][j] + B[i][j];}}
(b) For each Pk in {0, 1, 2, 3}:
for (i= Pk*3 + Pk to (Pk+1)*3 + Pk) {
// Outer Loop Parallelization
for (j = 0 to 31) {
} C[i][j] = A[i][j] + B[i][j];}
Considering we have a quad-core multiprocessor and the elements of the matrices A, B, C are stored in a row major order, answer the following questions.
(1) Using the table below, show how the parallelization (a) and (b) would work and determine how many cycles it would take to execute them on a system with a quad-core multiprocessor, assuming addition takes only one cycle.
Cycle
Pk = 0
Pk = 1
Pk = 2
Pk = 3
Cycle
Pk = 0
Pk = 1
Pk = 2
Pk = 3
(2) Which parallelization is better and why?

Answers

Distributing a loop across many loops is one method of parallelizing a loop with a loop-carried dependency. These distributed loops can run in parallel by separating statements that don't depend on one another.

Two primary parallelism types are supported by C#: Data parallelism is the process of performing an operation on each element in a collection. Task parallelism: the simultaneous execution of independent calculations There are several varieties of parallel processing; SIMD and MIMD are two of the most popular varieties. Single instruction multiple data, or SIMD, is a type of parallel processing where a computer has two or more processors that all follow the same instruction set but handle distinct types of data.Using Python's multiprocessing module, which is robust and has a ton of configurable settings and tweakable features, is one frequent technique to run functions in parallel.

To learn more about parallelizing click the link below:

brainly.com/question/16853486

#SPJ4

While browsing the Internet, You notice that your browser displays pop-ups containing advertisements that are related to recent keywords searches you have performed.
What is this an example of?
Adware.

Answers

The advertisements that are related to recent keywords searches that performed before is adware.

What is adware?

Adware is a software to create and display the pop-ups advertisement that have potential to carry malware. Adware is capable to tracking your search history and online activity to get the relevant keywords in order to be able to personalize ads that are more relevant to you.

Adware that carries malware hides in your computer system and runs in the background to monitor all your online activity so that it can provide personalized advertisements for you.

Learn more about malware here:

brainly.com/question/29650348

#SPJ4

you have been tasked with removing malware from an infected system. you have confirmed that there is an infection, and you continue running scans and removing the malware, but every time the system is rebooted, the malware comes back. which of the following should you do to help prevent this from happening?

Answers

The system is rebooted, the malware comes back, The following should you do to help prevent this from happening:

1. Identify the source of the infection.
2. Change all passwords associated with the system.
3. Update the operating system and all programs to their latest versions.
4. Install an anti-malware program and enable real-time protection.
5. Run a deep scan with an up-to-date anti-malware program.

What is malware?
Malware
is a type of malicious software designed to gain access to a computer system without the owner's knowledge or permission. It can be used to gain control of a system, steal data, and cause damage to hardware, software, and networks. Malware typically infiltrates computers through malicious web links, email attachments, or drive-by downloads. It can spread rapidly, making it difficult to detect and remove. Common types of malware include viruses, worms, Trojans, ransomware, spyware, and adware. Malware can be used for a variety of malicious activities, including identity theft, financial fraud, data theft, and censorship. As malicious software continues to evolve, it is important to have strong security measures in place to protect against malware threats.

To learn more about malware
https://brainly.com/question/399317
#SPJ1

Assume that the boolean variables a and b have been declared and initialized. Consider the following expression.
(a && (b || !a)) == a && b
Which of the following best describes the conditions under which the expression will evaluate to true?
A Only when a is true
B Only when b is true
C Only when both a and b are true
D The expression will never evaluate to true.
E The expression will always evaluate to true.

Answers

A boolean expression, named after mathematician George Boole, is a statement that can be either true or false when evaluated.

What are the 3 Boolean values?

An expression that may only be evaluated as true or false is known as a boolean expression (after mathematician George Boole).

Boolean variables are stored as 16-bit (2-byte) values and can only have a value of True or False. Boolean variables are presented as either True or False. Similar to C, when other numeric data types are transformed to Boolean values, a 0 becomes False and any other values become True.

The truth value, TRUE or FALSE, is represented by a Boolean value. A Boolean expression or predicate may produce an unknown value, which is represented by the null value.

Therefore, the correct answer is option b) B Only when b is true.

To learn more about boolean variables refer to:

https://brainly.com/question/26041371

#SPJ4

(1 point) you have 3 pairs of pants or skirts, 4 shirts or blouses, and 5 pairs of shoes. you can use them to wear 60 different outfits. you are a participant in a peace conference with 10 participants. everybody shakes everybody else's hand. there are 45 handshakes altogether. a family of five is taking an extended vacation. every day at lunch they stand in line at a cafeteria in a different order than ever before. on the last day, however, they can't help repeating a previous order. their vacation lasted 120 days.

Answers

1) Total different combinations of Pants, shirts and shoes are 60 .

2) Total number of handshakes = 45

3) The family's vacation lasted for 120 days.

What is combination in probability?

The discrete mathematics discipline of combinatorics is built on combinations and permutations. There is only counting in combinatorics. Counting appears simple at first glance. Since it was the first type of mathematics learned in school, it is no surprise. It turns out that counting is remarkably non-trivial, and mathematicians are currently working to solve a vast number of open combinatorial problems.

Any unordered subset of the given set of n distinct objects with size r≤n is referred to as a combination. "N choose r" stands for "n number of combinations of size r that can be formed from n different objects, without repetition." nCr may be written in some sources in its place.

Learn more about combinations

https://brainly.com/question/4658834

#SPJ4

Ronald is a software architect at MindSpace Software. He has been approached to develop a critical application for a finance company. The company has asked him to ensure that the employed coding process is secure. They have also requested that the project be completed in a few months, with a minimum version of the identified functionalities provided. The other functionalities can be developed later and added to the software while the application is live. Which development process would be ideal for Ronald to employ to achieve this objective? Ronald can employ a waterfall model to meet the requirements by testing the code at every phase of development. Ronald can employ an agile development model to meet the requirements with penetration testing done on the modules. Ronald can employ the rapid development model to meet the requirements of the client. Ronald can employ the SecDevOps model to meet the requirements of the client.

Answers

Ronald can employ the SecDevOps Model to meet the requirements of the client. Normalization it is the process of organizing data in tables and we use to remove redundancy.

In measurements and uses of insights, standardization can have a scope of implications. In the simplest of scenarios, normalizing ratings entails moving values measured on various scales to a scale that is conceptually comparable, frequently prior to averaging. In situations that are more complicated, the term "normalization" may refer to more complex adjustments whose goal is to align all adjusted-value probability distributions. In educational assessment, normalization of scores may be done with the intention of aligning distributions with a normal distribution. Quantile normalization, in which the quantiles of the various measures are aligned, is a different method for normalizing probability distributions.

Another way that normalization is used in statistics is when shifted and scaled versions of statistics are made. The idea is that these normalized values will make it possible to compare the corresponding normalized values for different datasets in a way that will remove the effects of some big influences, like in an anomaly time series. In order to arrive at values in relation to a size variable, some forms of normalization only require a rescaling. As far as levels of estimation, such proportions just appear to be legit for proportion estimations (where proportions of estimations are significant), not stretch estimations (where just distances are significant, however not proportions).

To know more about normalization visit

brainly.com/question/1798626

#SPJ4

Other Questions
Draw and give the IUPAC names for the following organic molecules: Ascorbic Acid (Vitamin C) Fructose Glucose use functions: getchar, putchar, fgets, fputs, fread, fwrite, printf, getc, putc, scanf, fprinf, fscanf, sprintf, sscanf, fseek, ftell, stdin, and stdout, to answer the questions: function to read a character from a file: function to read a character from keyboard: function to write a (non-formatted) string to a file: function to write formatted text into a memory location: function to move the file pointer in a random-access file: function to read a block of characters from file: a 47-year-old man presents with hiccups for three days. he is unable to stop them with any home remedies. his physical examination is benign. which of the following is a potential cause of hiccups? why is it that i keep thinking about kissing my (same gender) friend, when i'm straighter than a pencil? The equation for line g can be written as y1= 1/10 (x+8). Parallel to line g is line h, which passes through the point ( 5,5). What is the equation of line h? studies indicate that a lack of skill transferability in the u.s. has a particularly large effect on the earnings of an identified and assessed risk of material misstatement that, in the auditors' judgment, requires special audit considerations are called Write the equation of the line described below in slope-interceptform.Find the equation of the line that isperpendicular to the line y = 3x - 5 andpasses through the point (8, -7). which family boundary pattern is characterized by infrequent invasions by parents and infrequent defenses by adult children? TRUE/FALSE. effective leadership is influenced not only by leadership behavior but also task-oriented traits and interpersonal attributes. On a route to senior prom, a couple was cut off by another car. The couple traveling 21 m/s slammed on the brakes and slowed to a speed of 8 m/s in a time of 1.4 seconds. How far did they travel while breaking?1) 18 m2) 20 m3) 29 m4) 41 m5) answer not shown receptors that bind the neurotransmitter at the postsynaptic cell membrane are voltage-gated. t or f refer to the included bike safety patrol budget spreadsheet. a chart is to be created that will represent the amount that the bike patrol is spending on the purchase of their equipment. it is important for those looking at the chart to easily see what portion of the $488.74 is being spent on each type of equipment. which type of chart will best display this information? Select the correct answer.What must be demonstrated for the election of government officials to be perceived as legitimate? Women score higher than men on abilities such as motivating others, fostering communication, producing high-quality work, and listening to others planning involves the effort to direct and lead people to accomplish the planned work of the organization. State True or False your answer: a. Trueb. False in which group in the united states do mothers and fathers spend equal amounts of time with their children? your home insurance policy has a $400 deductible. if a small fire causes $600 damage to your home, what amount of the claim would the insurance company pay? Monte Services, Inc. is trying to establish the standard labor cost of a typical brake repair. The following data have been collected from time and motion studies conducted over the past month.Actual time spent on the brake repair 4.0 hourHourly wage rate $14Payroll taxes 12% of wage rateSetup and downtime 5% of actual labor timeCleanup and rest periods 31% of actual labor timeFringe benefits 23% of wage rateDetermine the standard direct labor hours per brake repair. (Round answer to 2 decimal places, e.g. 1.25.)Determine the standard direct labor hourly rate. (Round answer to 2 decimal places, e.g. 1.25.)Determine the standard direct labor cost per brake repair. (Round answer to 2 decimal places, e.g. 1.25.)If a brake repair took 4.60 hours at the standard hourly rate, what was the direct labor quantity variance? (Round answer to 2 decimal places, e.g. 1.25.) during which of the following rituals does the emperor of japan offer the first fruits of the autumn harvest festival to the sun goddess?