1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
quester [9]
8 months ago
15

A programmer is debugging an action-adventure game they have just created.

Computers and Technology
1 answer:
svlad2 [7]8 months ago
4 0

By trying the moves and decisions that players of the game will be unlikely to make is a good strategy for debugging a game so the answer is option A : Yes, because making unexpected moves is likely to test the game's limits.

<h3>How does a programmer debug a program?</h3>

Debugging as defined in computer programming  is known to be a kind of a  multistep procedure which involves the act of knowing a problem, and also isolating the origin of the problem, and lastly one can correct the issue or know a way to work around the issue.

Note that the last step of debugging is to test the correction that was made or one can  workaround and make sure that it works or functions well.

Hence, By trying the moves and decisions that players of the game will be unlikely to make is a good strategy for debugging a game so the answer is option A : Yes, because making unexpected moves is likely to test the game's limits.

Learn more about debug  from

brainly.com/question/15079851

#SPJ1

You might be interested in
In most programming languages, the compiler carries a preprocessing step to determine if certain statements will compile. For in
MakcuM [25]

Answer:

See explaination for program code

Explanation:

package com.company;

import java.io.IOException;

import java.nio.file.Files;

import java.nio.file.Paths;

import java.util.Stack;

/*

* A program which reads input from given text filename and prints

* whether it passed the pre-processing stage or not

* Sample input

* int A = (a + b);static void display(int x)

* {

* //A sample input file

* }

* */

public class MyPreprocessor {

/*

* Reads input from filename and returns a string

* containing whole text

* */

public String readInput(String filename) {

String content = "";

try {

content = new String(Files.readAllBytes(Paths.get(filename)));

} catch (IOException e) {

e.printStackTrace();

}

return content;

}

/**

* Filters input since we are only concerned with

* a subset of input = '{}[]()/*'

*/

public String filterText(String text) {

String output = "";

for(int i = 0;i<text.length();++i) {

switch (text.charAt(i)) {

case '[':

case ']':

case '{':

case '}':

case '(':

case ')':

case '*':

case '/':

output += text.charAt(i);

}

}

return output;

}

/*

* Uses stack to determine if input is valid or not

* */

public boolean parse(String input) {

Stack<Character> St = new Stack<Character>();

// '$' is special symbol to represent bottom of stack

St.push('$');

for(int i = 0;i<input.length();++i) {

Character symbol = input.charAt(i);

if(St.peek().equals(getOpenSymbol(symbol)))

St.pop();

else St.push(symbol);

}

return St.peek() == '$';

}

private static Character getOpenSymbol(Character symbol) {

switch (symbol) {

case '}': return '{';

case ']': return '[';

case ')': return '(';

case '*': return '*';

case '/': return '/';

default: return ' ';

}

}

public static void main(String[] args) {

MyPreprocessor preprocessor = new MyPreprocessor();

String inputText = preprocessor.readInput("src/input.txt");

String filteredInput = preprocessor.filterText(inputText);

if(preprocessor.parse(filteredInput))

System.out.println("preprocessing passed.");

else System.out.println("preprocessing failed!");

}

}

6 0
3 years ago
The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * sym
Juli2301 [7.4K]

Answer:

num = int(input("enter a number:"))

print(num * 8)

Explanation:

num is just a variable could be named anything you want.

if code was like this num = input("enter a number:")

and do a print(num * 8)

we get an error because whatever the user puts in input comes out a string.

we cast int() around our input() function to convert from string to integer.

therefore: num = int(input("enter a number:"))

will allow us to do  print(num * 8)

6 0
3 years ago
A web page typically contains ________, which contains the formatting instructions for displaying the web page.
USPshnik [31]
HTML: Hypertext Markup Language. It's used in conjunction with CSS (Cascading Style Sheets), which implements presentation (adding color, positioning elements, etc.) and JavaScript (you'll often see this referred to as JS), which implements functionality (like clicking on buttons) for webpages.
3 0
3 years ago
What will be the value of x after the following code is executed? int x = 10; do { x *= 20; } while (x &lt; 5); A. 10 B. 200 C.
dezoksy [38]

Answer:

Option B is the correct answer.

Explanation:

  • In the above code, the loop will execute only one time because the loop condition is false and it is the Do-While loop and the property of the Do-while loop is to execute on a single time if the loop condition is false.
  • Then the statement "x*=20;" will execute one and gives the result 200 for x variable because this statement means "x=x*20".
  • SO the 200 is the answer for the X variable which is described above and it is stated from option B. Hence it is the correct option while the other is not because--
  1. Option A states that the value is 10 but the value is 200.
  2. Option C states that this is an infinite loop but the loop is executed one time.
  3. Option D states that the loop will not be executed but the loop is executed one time
6 0
3 years ago
Read 2 more answers
1. Write a generic method that compares its 2 arguments using the equals method and returns true if they are equal and false oth
Ganezh [65]

Answer:

Explanation:

The following piece of code is written in Java. It creates the method as requested that takes in two generic objects and compares them using the .equals() built in Java method. This method will return True if the objects are identical or False if they are not. A test case is used in the code and the output can be seen in the attached image below.

   public static <T> boolean comparePerez(T a, T b) {

       return a.equals(b);

   }

5 0
3 years ago
Other questions:
  • _ includes websites that encourage interaction and connection among people, businesses, and organizations.
    5·1 answer
  • Brainstorming the pros and cons of upgrading versus replacing a set of ten desktop computers _________
    6·1 answer
  • After spending a year in India, Giovanna returns home to the United States and is inspired to raise money to help her new friend
    14·1 answer
  • The method for updating the main memory as soon as a word is removed from the cache is called
    10·1 answer
  • Define the following term. data, database, DBMS, database system, data- base catalog, program-data independence, user wen', DBA,
    12·1 answer
  • A program that will read each player’s name and golf score as keyboard input,
    9·1 answer
  • The ________ utility automatically creates duplicates of your libraries, desktops, contacts, and favorites to another storage lo
    6·1 answer
  • What is the difference between MySQL and MariaDB?
    9·1 answer
  • Which of the following online creation tools will be used if a person wants to create a video presentation?
    8·1 answer
  • oe, a user, receives an email from a popular video streaming website. the email urges him to renew his membership. the message a
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!