Errors can be syntax errors or logic errors (the code works, but not as intended). In the Guess My Number game, there is a lower limit and an upper limit for the range of possible numbers to guess. If the lower limit were exclusive and the upper limit inclusive, which expression would properly generate values for the secret number?

(int)(Math.random() * (upper − lower + 1) ) + lower
(int)(Math.random() * (upper − lower) ) + lower + 1
(int)(Math.random() * (upper − lower + 1) ) + lower - 1

Answers

Answer 1

Errors can be syntax errors or logic errors (the code works, but not as intended) is option A: (int)(Math.random() * (upper − lower) ) + lower

What is  the syntax errors about?

The phrase that would correctly provide results for the secret number if the lower limit were inclusive and the upper limit exclusive is Option A

Note that we cannot increase the lower limit by one because it is INCLUSIVE. Additionally, the Math.random() function returns a result between [0,1[ that satisfies our requirements (meaning the 0 is included, but not the 1).

Therefore, We'll be flawless if the (int) caster returns only the integer component after rounding down the result.

Learn more about syntax errors from

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


Related Questions

Translate the following C program to Pep/9 assembly language.

#include
int myAge;
void putNext(int age) {
int nextYr;
nextYr = age + 1;
printf("Age: %d\n", age);
printf("Age next year: %d\n", nextYr);
}
int main () {
scanf("%d", &myAge);
putNext(myAge);
putNext(64);
return 0;
}

Answers

Answer:

finds one age

Explanation:

it finds ones age and updates it annually by adding 1 year to the default age

Select the correct word to complete the sentence.

, developed by the National Science Foundation, evolved into the modern Internet backbone structure.

NSFNET
Pentium
UNIVAC
Telenet

Answers

Answer:

NSFNET

Explanation:

Answer:

NSFNET

Explanation:

Codehs 4.1.7 Calling a Method​

Answers

Using the knowledge of computational language in python it is possible to write a code that a method is a way to teach the computer a new command. A method should do one simple job, and should be written like a command, like turnRight , or printHello .

Writting the code:

import java.util.Scanner;

public class TaffyTester

{

 public static void main(String[] args)

 {

   Scanner x = new Scanner(System.in);

   System.out.println("\nStarting Taffy Timer...");

   System.out.print("Enter the temperature: ");

   float temp = x.nextFloat();

   while( temp < 270 )

   {

     System.out.println("\nThe Mixture isn't ready yet.");

     System.out.print("Enter the temperature: ");

     temp = x.nextFloat();

   }

   System.out.println("Your taffy is ready for the next step!");

 }

}

See more about JAVA at brainly.com/question/12975450

#SPJ1

Which field is not used for non inventory products

Answers

The field that is not used for non inventory products are:

BOMs Manufacturing OrdersShipments.

What is a non inventory product?

An item that a business buys for its own use or to resell but does not track in terms of quantity is one that can be referred to as a non-inventory item.

Note that Non-inventory items are frequently low-value goods for which maintaining an exact count is one that would not significantly benefit the company.

Therefore, based on the above, Items that are not inventoried can only be utilized in invoices, customer orders, and purchase orders (can be bought as well as sold).

Learn more about non inventory products from

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

How have computers changed since the 70s?

Answers

Explanation:

Computers have evolved and advanced significantly over the decades since they originated. Many years ago, in their most rudimentary form, computers were very large and slow.

So I'm doing a coding project and I need to turn all my pargaphs purple on my 4 different pages

Answers

For a sample code given below:

The CSS Code

body {

}

h2 {

    color: red;

}

p {

    color: pink;

}  

p {

   color: green;

}

p {

   color: purple;

}

.orange > p {

   color:orange;

}

.blue {

  color: blue;

}

#red {

   color: red;

}

#div1 > h4 {

   background-color: black;

  color: white;

}

You need to know that if you want to change the color of all your paragraphs in your CSS code, you would have to add the appropriate CSS selector.

Next, you would need to define the color property with the value you want. For example, say you want to change the color of all paragraphs on your site to navy.

You would have to add p {color: #000080; } to the head section of your HTML file.

You should note that #div1 is the parent of the p elements. This means that some properties (such as the background) of #div1 will be applied to the child element(s).

Read more about CSS here:

https://brainly.com/question/27818468

#SPJ1

Write a note on scanning devices.

Answers

A scanner is a device that captures images from photographic prints, posters, magazine pages and similar sources for computer editing and display. Scanners work by converting the image on the document into digital information that can be stored on a computer through optical character recognition (OCR).

is there anyone here who can teach me HTML​

Answers

Answer:

Codecademy has numerous free programs to provide you with the technical skills you need. ...

Learn-HTML.org is a reliable source for everything you need to know about HTML. ...

General Assembly Dash is a popular site to begin to learn the basics of HTML.

Discuss some of the ways in which analytics assist information systems management as well as the organization at large. What kinds of data are most useful and how is it gathered? How do managers protect customers, clients, and even employees’ personally identifiable information in order for those who may not have permission to view it? How is the data secured in general?

Answers

The ways in which analytics assist information systems management as well as the organization at large are:

It often personalize one's customer experience. It make better business decision-making. It often Streamline operations. It lowers Mitigate risk as well as handle setbacks.

What kinds of data are most useful and how is it gathered?

The types of data that to be most useful to firms are:

Customer dataIT data internal financial data.

They can be gathered through:

Online poolsSurveysTransactional TrackingObservation, etc.

Note that data is secured in general through the use of good security measures and also through security technology.

Learn more about analytics from

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

write a java program using switch that allow the user to input length and width and check if it is square or rectangle.

Answers

import java.util.Scanner;

class check_rectorsq {

   public static void main(String[] args) {

       System.out.println("Enter length and width: ");

       Scanner idx = new Scanner(System.in);

       int x = idx.nextInt();

       int y = idx.nextInt();

       int f = (x==y) ? 1 : 0;

       switch(f) {

           case 1:

               System.out.println("This is a square!");

               break;

           case 0:

               System.out.println("This is a rectangle!");

               break;

           default:

               ;;

       }

   }

}

The destination operand of the or instruction cannot be a memory operand.
a. True
b. False

Answers

The given statement is false. By performing a bitwise OR operation, the OR instruction supports logical expression.

What is OR instruction?By performing a bitwise OR operation, the OR instruction supports logical expression. If the matched bits from either or both operands are 1, the bitwise OR operator returns 1. If both of the bits are zero, it returns 0. One or more bits may be set using the OR operator. A bitwise instruction is an OR instruction. This implies that the digits of two integers with the same amount of bits (for example, two 32-bit numbers) are handled bit by bit (and not the complete number). If both "input" bits are 0, the OR instruction produces a result of 0, and a result of 1, if at least one input bit is a 1.A memory operand cannot be the destination operand of the OR instruction. The destination operand is always changed by the TEST instruction. The Zero flag is always set when an operand is XORed with 1. The two's complement of an integer can be created by applying the XOR instruction to it.The given statement is false. By performing a bitwise OR operation, the OR instruction supports logical expression.

To learn more about OR instruction refer to:

https://brainly.com/question/28108225

#SPJ13

True or False? O(N) is called log time.

Answers

Answer:

False

O(N) is linear time

Explanation:

False, it is not log time

which technology concept uses computer resources from multiple locations to solve a problem

Answers

Answer:

Grid computing is a system connecting many computer nodes into a distributed architecture that delivers the computing resources necessary to solve complex problems.

The source document states:

(S) The range of the weapon is 70 miles.

The new document states:

(S) The weapon may successfully be deployed at a range of 70 miles.

Which concept was used to determine the derivative classification of the new document?

Select one:

a.
Revealed by


b.
Classification by Compilation


c.
Extension


d.
Contained in

Answers

Answer: its b i took the test

Explanation:

". When input is wrong, the output will also be wrong, it is term S a. GIGO c. Bug b. IPM d. Debug​

Answers

Answer:

a.GIGO

b.bug

c.ipm

d. debug

it's answer is GIGO

A ______ is where one network ends and another begins.

Answers

Answer:

A demarcation point is where one network ends and another begins.

A demarcation point is where one network ends and another begins.

What is a demarcation point?

Two or more computers are connected together to share resources (such as printers and CDs), exchange files, and enable electronic communications to make up a network.

Where one network stops and another starts is known as a demarcation point. Explanation: In addition to the demarcation point, other terms for it include demarc extension, point of demarcation, and simply demarc.

A demarcation point often called a boundary point or network boundary point marks the physical boundary between a customer's private network and the public network of a telecommunications provider. Typically, this is where the cable actually enters a structure.

Therefore, the term where one network ends and another begins is a demarcation point.

To learn more about the demarcation point, refer to the link:

https://brainly.com/question/14533761

#SPJ12

True or false. The quick access toolbar allows you to access tools you do not use frequently

Answers

the answer is: false

Ewaste reuses or refurbishes ewaste and creates a new product.
True or False

Answers

Answer:

true

Explanation:

yes

Answer:

true true true true true true true true true true true true true true true true

Explanation:

duh

When assembling a career portfolio, what should a student do before assessing their work?

A.
consider the types of jobs they will likely apply for

B.
delete or throw away projects that are not good enough to include

C.
assemble the documents and files in the order they were created

D.
design a cover for a physical portfolio or a landing page for an electronic portfolio

Please don't guess.

Answers

Answer:

A.

Consider the types of jobs they will apply for.

Explanation:

It's critical to consider the types of jobs the student will apply for before assessing their work to know which information will be the most predominant and favorable to your employer.

you're doing desktop support and the company policy is that you can only help with company equipment. a user walks in:

Answers

The responsibility of the desktop support technician is to support and maintain the desktops, peripherals, and computer systems of the organization. To achieve optimal workstation performance, this entails installing, identifying, repairing, maintaining, and upgrading all organizational hardware and tools.

How does desktop support work?

IT support professionals known as desktop support engineers help customers with hardware and software difficulties. Their duties include providing on-site or remote technical support for computer hardware setup, software installation and upgrade, and basic IT problem-solving. While a help desk can resolve a variety of IT problems, desktop support is limited to resolving problems with desktop or laptop computers. It can help you install apps or fix a malfunctioning computer, but it can't assist with printers or networks. The help desk service often includes desktop support. Yes, for many people, a job in desktop assistance is a good fit. This position is appropriate for entry-level workers who want to

To learn more about 'desktop' refer to

https://brainly.com/question/14719198

#SPJ13

After completing a repair on a vehicle what should the technician do next?
Have the customer verify the repair
Perform a quality inspection
Return the vehicle to the lot
Move to the next job

Answers

The next thing which the technician should do after completing a repair on a vehicle is to B. Perform a quality inspection

What is Vehicle Repair?

This refers to the process of restoring to full functionality the normal working process of a vehicle that makes use of mechanical components or parts.

This process requires the diagnostics of the car to find the area of the vehicle that contains the fault and then proceed to repairs and this is done by the fixing or replacing of the damaged parts.

Hence, it can be clearly seen that when a vehicle technician has completed his repairs on a faulty vehicle, the next step he would do would be to perform a quality inspection to verify that the problem is solved.

With this in mind, we can boldly state that the correct answer to the given question is option B as explained above.

Read more about vehicle repairs here:

https://brainly.com/question/21415662

#SPJ1

What is the name of the software for managing real estate

Answers

nTireFM is a comprehensive system for real estate vendors with unique and reliable needs. Real Estate Management Software simplifies your life as a real estate investor monitors the financial performance of each rental property

Answer:

Is it Real Greeks?

Explanation:

Write a program that prints a formatted no parking sign 2:00 - 6:00 a.m.

Answers

Using the knowledge in computational language in python it is possible to write a code that write a program that prints a formatted no parking sign 2:00 - 6:00 a.m..

Writting the code:

print(' NO PARKING')#i have used 3 leading spaces to match the output

#you can remove 1 if you like

print('2:00 - 6:00 a.m.')

See more about python at brainly.com/question/18502436

#SPJ1

Answer in 3-5 sentences for each

What is a baseline? Why is recording an accurate baseline critical to the troubleshooting process?

Demonstrate through discussion that you understand the types of software applications that are prime for NLB and those that are better protected with failover clusters. Discuss various operations known and dissect the functions. Which functions should be protected by which technology?

Answers

A baseline is a constant point of comparison that is employed in comparison studies.

What is baseline?

In business, a project's or product's success is frequently evaluated in comparison to a baseline figure for expenses, sales, or any other number of factors. A project may go over or under its predetermined benchmark.

For instance, a business can use the number of units sold in the first year as a benchmark against which to compare subsequent annual sales in order to assess the success of a product line. The baseline acts as the benchmark against which all subsequent sales are evaluated.

Any number that acts as an acceptable and specified beginning point for comparisons can be used as a baseline. It can be used to assess the results of a change, monitor the development of an improvement project, or compare two periods of time.

Therefore, A baseline is a constant point of comparison that is employed in comparison studies.

To learn more about baseline, refer to the link:

https://brainly.com/question/14799723

#SPJ1

I am making a python calculator and the issue I am having is that I can only add integers (whole numbers) What changes do I need to make to my code to be able to add integers and floats?


print("Welcome to the big daddy caculater this caculater can do add anything you desire ")

num1 = input("Enter a number: ")
num2 = input("Enter another number: ")

result = int(num1) + int(num2)


print(result)

Answers

The changed code to be able to add integers and float is:

num1 = float(input(("Enter a number: "));

num2 = float(input(("Enter another number: "));

result = num1 + num2;

print(result)

Integers and floats

The numbers represented by integers and floats are as follows:

Integers: the integer set, containing only non-decimal numbers.Floats: the real set, containing both non-decimal and decimal numbers.

From the above definition, we have that the float class contains the integer class, as it also accepts non-decimal values, hence your input should be read as a float, according to the following code section:

num1 = float(input(("Enter a number: "));

num2 = float(input(("Enter another number: "));

Then the addition can be made without any casting, as follows:

result = num1 + num2;

While the print command continues as it is.

More can be learned about integers and floats at https://brainly.com/question/27634578

#SPJ1

Which is beter 4G network or 5G network?
What's the difference between them?​

Answers

Answer:

5G

Explanation:

5G can be massively faster than 4G and 3G speed

5G speed is lighting fast while on a 4G network it takes 50 minutes on average.

5G also adds more space so you can have higher data speed.

Answer:

5G up to 100 times faster than 4G

Yet even today, with 5G technology still at the early stage of its evolution, speeds are lightning fast. For example, AT&T's 5G Plus network achieves typical download speeds of 75 Mbps, which will download a movie in just 49 seconds. On a 4G network, this takes 50 minutes on average.

True or False? O(1) is called constant time.

Answers

Answer:

True

Explanation:

The notation O(n), pronounced big-O of n is an indication of the complexity of an algorithm. It is an indication of the relationship between the processing time and size of input

So O(n) means the time - input relationship is linear. If it takes x time units to process an input of size y then it will take 5x units to process an input of size 5y

O(1) means the time to process is independent of size. It is always constant. For example in computer algorithms, the time to access a value in an array of values is independent of the size of the array because arrays are indexed and access time for any element of the array is the same

O(n²) means that the time taken varies as the square of the input size

and so on

Your mom cuz it’s your mom

Top one pls I need help

Answers

Answer:

spyware

Explanation:

What are the 3 fundamental of computer

Answers

Answer:

There are four basic functions of the computer: Input, Processing, Output, and Storage.

Explanation:

These skills can be applied in everyday life by helping them to choose technology and use it effectively, troubleshoot current technologies, and transfer that knowledge to explore emerging technologies.

Explanation:

1) Arithemetric logical unit

2) control unit

3)central processing unit

Please help. Which ones would it be?

Answers

c and d is the answer
Other Questions
How chemistry lights up the fourth of july How can you tell if an online source is reliable? What qualities do you look for? Identify the types of sampling errors that exist in the following sampling designs:A radio show asks people to phone in their views on whether the United States should house the homeless.The student newspaper plans to make a prediction for the student council election based on a survey of its readers.A new gym chooses to survey the first 20 members who enter the facility one day to determine whether members favor the new elliptical machines. I, voluntary; II, nonresponse; III, convenience I, nonresponse; II, voluntary; III, convenience I, nonresponse; II, convenience; III, voluntary I, voluntary; II, convenience; III, nonresponse I, convenience; II, voluntary; III, nonresponse Complete the process of protein synthesis by completing the chart below.Remember you must first do transcription, creating an mRNA strand from the DNA, follow pairing rulesThen you must do translation using your codon chart to decode the mRNA Youve decided to give the department with the most participation in the united way campaign a pizza party. When you ask your supervisor for the funding for the pizza, what reason do you give to support your decision?. there are 5 students in mun elligible for a particular event at the next conference however, only two can compete. they are equally qualified, so it is decided that the contestants will be randomly selected. what is the probability that the first two students alphabetically will be selected? on december 28, 2024, tristar communications sold 15 units of its new satellite uplink system to various customers for $10,000 each. the terms of each sale were 3/15, n/30. tristar uses the gross method to account for sales discounts. in what year will income before tax be affected by discounts, assuming that all customers paid the net-of-discount amount on january 6, 2025? by how much? Which type of figurative language does Robert Louis Stevenson use to describe his shadow? "For he sometimes shoots up taller like an India-rubber ball, And he sometimes gets so little that there's none of him at all." Hyperbole, Metaphor , Onomatopoeia ,Idiom What is the end behavior of the polynomial function?Drag the choices in to the boxes to correctly describe the end behavior of the function. The Federalists made the argument that: A. the constitution needed to be more specific in describing the federal military's structure. B. the constitution needed to include specific measures to protect individual rights. C. paying national debts and funding the military should be tasks left to state governments. D. a system of checks & balances would keep the federal government from becoming too powerful. During the next few weeks Miss Ryan overcame my fears of tall, energetic teachers as she bent over my desk to help me with a word in the pre-primer. Step by step, she loosened me and my classmates from the safe anchorage of the desks for recitations at the blackboard and consultations at her desk. Frequently she burst into happy announcements to the whole class. Ito can read a sentence, and small Japanese Ito, squint-eyed and shy, slowly read aloud while the class listened in wonder: Come, Skipper, come. Come and run. The Korean, Portuguese, Italian, and Polish first graders had similar moments of glory, no less shining than mine the day I conquered butterfly, which I had been persistently pronouncing in standard Spanish as boo-ter-flee. Children, Miss Ryan called for attention. Ernesto has learned how to pronounce butterfly ! And I proved it with a perfect imitation of Miss Ryan. From that celebrated success, I was soon able to match Itos progress as a sentence reader with Come, butterfly, come fly with me. Read the following dictionary entry:wonderverbto be curious or want to learn somethingto feel amazement or admirationto feel doubtDecide which definition best matches wonder as it is used in paragraph 13 of Barrio Boy. Write that definition of wonder here and indicate which clues found in the text helped you determine the meaning. Nitrogen and hydrogen react to form ammonia in the Haber process. Which of the curves belowshows this process when iron is added to the reaction? while providing care to a client who has a tracheostomy with a nondisposable inner cannula, the nurse observes secretions that have accumulated in the outer cannula. which action would the nurse take? The monthly subscription price for a popular streaming service increases, ceteris paribus. As a result, demand will _____ quantity demanded will ______be constant; increase be constant: decrease increase; be constant decrease; be constant depend on its determinants; increase No ability to tax Couldnt regulate tradecouldnt enforce laws no national courts systemno central leadership (executive branch)amendments required unanimous approval of 13 statesno armyRank the 7 weaknesses above 1-7, with 1 being the most serious, 7 beings the least serious. then explain why you feel your #1 is the most serious. Find the distance between the two points.(-6, -3) and (194,42)The distance is(Type an exact answer, using radicals as needed.) Based on this information, what can you conclude about how the narrator has spent her time over the years? Does it seem like the narrator let go of her bitterness about losing her job? Support your answer using information from the passage.Answer Zack and Zane were floating down the river. They climbed to the top of the rock, which was 14.6 feet above the water level. When Zack jumped in, he got down to a depth of 6.8 feet underwater. What was the total distance from his highest point to his lowest point? FemaleMaleTotal10113Snellville StoneMountain121426316102030Suwanee81624Consider the following table with information about a sample of students from Phoenix High School and where theylive. If a person is randomly selected determine the following probability provided the condition: P(Female | Suwanee).Total305080 During a physics lab, students added weights of different masses to aspring. After adding each weight to the spring, they measured how far theweight was from the lab tabletop, in centimeters. Then they graphed thedata and calculated the line of best fit to be y = -1 x + 10.25Weight Distance fromthe Tabletop (cm)108642Effect of Weightson a Spring0 50 100 150 200 250 300Mass (g)What does the x-intercept represent?-XAt 250 grams, the weight will touch thetabletop.With no weight, the spring is 10centimeters above the tabletop.The weight will be 250 centimetersabove the tabletop when the spring hasa mass of 10 grams on it.The spring stretches and the weight is 1centimeter closer to the tabletop forevery 25 grams added to it.