At each step it should print out the move it makes and its performance score (e.g. S 0.2). Every 5 steps, it should print out a grid, with a "[ ]" on the square where the robot is now. Thus, with the above input, if the robot has done S U S L S, the output would be:

Answers

Answer 1

Answer:

The output would be S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]

Explanation:

Given that at each step output prints for example S 0.2.

Also given after every 5 steps, it should print a grid "[ ]".

if robot has been given S U S L S, it prints output as

S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]


Related Questions

Let L be the set of exactly those strings over the alphabet \Sigma = {a, b, c, g}, that satisfy all of the following properties: the length of the string is equal to 5n+3, for some natural number n greater or equal than 0; all of the first (leftmost) 2n symbols are elements of the set {b, c, g}; all of the last (rightmost) 3n symbols are elements of the set {a, b}; the symbols at position 2n+1, 2n+2, and 2n+3 (from the left, i.e., after the first 2n symbols but before the last 3n symbols) are elements of the set {c, g}; Write a complete formal definition of a context free grammar that generates L. If such a context free grammar does not exist, state that the context free grammar does not exist, and prove it.

Answers

Answer:

S -> LSR

S -> M

M -> YYY

Y -> c | g

L -> XX

X -> b | c | g

R -> ZZZ

Z -> a | b

Explanation:

This is a long time ago, but I think this does what you want.

Start symbol S expands to LSR and allows you to grow L and R on either side as much as you want. Ultimately S must be replaced by M. Then you have a pattern like LLLLLMRRRRR.

We can then further break down L into 2 times b, c or g, and similar for M and R.

which data type uses %i as a format specifier​

Answers

Answer:

A decimal integer

Explanation:

Hope this helps!

Identify at least three tips you would give to people to stay safe on the Internet so that their information stays secure. Explain why these tips are useful.

Answers

Answer:

1. Do not give away personal information such as your address, school you go to, or anything like that (obvious reasons

2. Do not share your passwords because people can hack into your things

3. Don't make guessable passwords such as Cookies, ILovePizza, Money

1. Never give out your address, phone number, school name, etc.
This can lead to so many bad things. To protect yourself and others around you, don’t share your personal information to people you don’t know or trust.

2. Don’t add people on social media that you don’t know. I know a lot of people have public accounts and I’m not saying thats bad, but I am saying that you need to be careful on who’s adding you. There are a lot of creepy people out there.

3. Never open links people send you. If someone sends you a link online, it’s best to not open it. This opens up a whole new world for creeps to mess with you. They can track you, give you a virus or viruses. Never open random links that random people send you.

Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation.

Answers

Answer:

The method in C++ is as follows:

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

   double baseArea = calcBaseArea(baseLength, baseWidth);

   double volume = baseArea * pyramidHeight;

   return volume;    

}

Explanation:

This defines the calcPyramidVolume method

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

This calls the calcBaseArea method to calculate the base area of the pyramid

   double baseArea = calcBaseArea(baseLength, baseWidth);

This calculates the volume

   double volume = baseArea * pyramidHeight;

This returns the volume

   return volume;  

}

See attachment for complete program that include all methods that is required for the program to function.

Write an algorithm to sum to values

Answers

Answer:

There is no need to make an algorithm for this simple problem. Just add the two numbers by storing in two different variables as follows:

Let a,b be two numbers.

c=a+b;

print(c);

But, if you want to find the sum of more numbers, you can use any loop like for, while or do-while as follows:

Let a be the variable where the input numbers are stored.

while(f==1)

{

printf(“Enter number”);

scanf(“Take number into the variable a”);

sum=sum+a;

printf(“Do you want to enter more numbers? 1 for yes, 0 for no”);

scanf(“Take the input into the variable f”);

}

print(Sum)

Explanation:

hi there answer is given mar me as brainliest

A programmer writes 500 lines of computer code in 17 days. Must there have been at least 1 day when the programmer wrote 30 or more lines of code

Answers

Answer:

The answer is No

Explanation:

Given data

Total Lines of code= 500

Number of days= 17 days

Number of codes written per day= 500/17

Number of codes written per day= 29.4117

If we multiply 29.4117 by 17

=499.9989

=500 approx

Hence there was never a day when the programmer wrote 30 or more lines

Amy’s new summer job at the pool will put $9 per hour. Which term describes this type of hourly income?
A. Salary
B. Take-home pay
C. Wage
D. All of the above

Answers

Answer:

d

Explanation:

% Write a procedure that calculates the sum of the numbers in % a given range. The parameters to this procedure should be % as follows: % % 1. The low end of the range % 2. The high end of the range % 3. The sum of the values in the range % % If the low end equals the high end, then the sum should be % whatever value is equal to the low/high end (the range is % inclusive). If the low end is greater than the high end, % then failure should occur.

Answers

Answer:

The procedure in python 3 is as follows:

def add_range(low,high):

   if low<= high:

       total = 0

       for i in range(low,high+1):

           total+=i

       return total

   else:

       return "Failure"

Explanation:

This defines the function/procedure

def add_range(low,high):

If low is less or equal to high

   if low<= high:

Initialize total to 0

       total = 0

Add up numbers in the range

       for i in range(low,high+1):

           total+=i

Return the total

       return total

If low is greater, then return failure

   else:

       return "Failure"

A compound Boolean expression created with the _________ operator is true if either of its subexpressions is true.

Answers

The answer for the question is butt

what is software? what are two types of software?​

Answers

Software is the programs and other operating information used by a computer. Two types of software are system software and Application software. Hope this helps :)

Answer:

Software is the collection of programs which makes computer work. The two types of software are 1)Application software

2)System software

Describe Technology class using at least 3 adjectives

Answers

Answer:

clearly alien

typically inept

deadly modern

Explanation:

6.What does transgenic mean?​

Answers

answer:

transgenic means that one or more DNA sequences from another species have been introduced by artificial means.

explanation:

transgenic plants can be made by introducing foreign DNA into a variety of different tissuestransgenic mice are one of the most common animal models used

relating to or denoting an organism that contains genetic material into which DNA from an unrelated organism has been artificially introduced. being or used to produce an organism or cell of one species into which one or more genes of another species have been incorporated a transgenic mouse transgenic crops and produced by or consisting of transgenic plants or animals.

Scenario: A robot is sitting in a chair with its arms facing down. Write an algorithm, using pseudocode, to make the robot:
1. stand up2. walk forward until it senses a wall3. turn around4. walk back to the chair5. sit down in its original starting positionFinally, output the total number of steps taken.Commands--------In addition to our standard pseudocode commands, you must also use the following robot control commands:sitstandstep (one step forward)raise arms (parallel to floor)lower arms (pointing to floor)sense (only if arms are raised)turn (90 degrees right)Immediately after issuing a sense command, you can check whether the robot is at the wall as follows:if at wallor alternativelyif not at wallAssumptions-----------You must assume the following facts:The robot's initial sitting position is directly facing the target wall.There are no obstacles between the robot and the wall.The wall is 1 or more exact steps from the chair.The wall is sensed when it is less than 1 step from the robot's arms.The length of the robot's arms are slightly less than the length of 1 step.Your solution-------------Your solution must include all of the following:Adequate commentsInitialization and use of at least one variableSequential flow of controlConditional flow of controlIterative flow of controlHandling of any special casesOutput of the total number of steps takenYour solution-------------Your solution must include all of the following:Adequate commentsInitialization and use of at least one variableSequential flow of controlConditional flow of controlIterative flow of controlHandling of any special casesOutput of the total number of steps taken

Answers

Solution :

[tex]\text{Algorithm to}[/tex] stand [tex]$\etxt{up:}$[/tex]

step [tex]1[/tex]: [tex]$\text{stand}$[/tex]

step 2: [tex]\text{raise arms}[/tex]

[tex]\text{Algorithm to}[/tex] walk [tex]$\text{until it senses}$[/tex] a wall:

step [tex]1[/tex]: [tex]$\text{stand}$[/tex]

step 2: [tex]\text{raise arms}[/tex]

step 3: [tex]$\text{wallSensed}$[/tex]=false

step 4: [tex]$\text{numberOfSteps}$[/tex] = 0

step 5: if([tex]$\text{wallSensed}$[/tex]==true) then

[tex]\text{lower arms}[/tex]

step

else

if(sense)

[tex]$\text{wallSensed}$[/tex]=true;

else

step

[tex]$\text{numberOfSteps}$[/tex]++;

step 6: display [tex]$\text{numberOfSteps}$[/tex] to reach the wall

[tex]\text{Algorithm to}[/tex] turn around:

Step [tex]1[/tex]: if([tex]$\text{wallSensed}$[/tex]==true) then

turn

[tex]\text{raise arms}[/tex]

turn

 

[tex]\text{Algorithm to}[/tex] walk back[tex]$\text{ to the chair}$[/tex]:

Step [tex]1[/tex]: [tex]$\text{turn around}$[/tex]

Step 2: for i=[tex]1[/tex] to [tex]$\text{numberOfSteps}$[/tex] do

step

[tex]\text{Algorithm to}[/tex] sit back down:

Step [tex]1[/tex]: sit

Step 2: Lower arms

how do computers help us with our homework​

Answers

A computer can be helpful in completing homework because it gives you access to lots of sources of information like graphing websites, calculators, educational games & programs that can help you. It also allows for an easier process to submit work, organize papers, & presentations.

xD I don't know if you said this as a joke, or if you're serious, but here:

A computer can be a helpful tool to complete your homework by giving you access to countless sources of information, it can also provide you with educational games which can enhance a child's learning ability by presenting learning as something fun and interactive as opposed to boring loads of repeated work which barely stimulate learning at all. But keep in mind that a computer can also take the opposite effect on a child's brain, and can gradually turn into addiction.

I hope this helps! :D

(FYI, I spent an unreasonable amount of time typing this all in, so I hope it makes any difference at all :P)

What can be viewed in the Tasks folder? Check all that apply

Answers

Answer: task details; appointments; to do list

Explanation:

Task folders, simply allows an individual organize their tasks in a logical manner. It performs an identical function just like a file directory.

Folders can be created in the root folder. Once can also create them as subfolder in the other files. The task details, appointments and the to do list can be viewed in the task folder.

I need solutions to below questions with python code:
Write a program, my_family.py For Loop A program, work-list.pyList
1. that contains a Tuple holding the names of friends or family members. Then use a For Loop to read and print the names.
2. that contains a of six integers. Use a list method to add one more integer. Use a list method to sort the list. Use a While Loop to print the entries.

Answers

Answer:

1) my_family.py

family = ('Dad', 'Mom', 'Agnes', 'David', 'Chris', 'Millie')

for name in range(len(family)):

   print(family[name])

2) work_list.py

my_number = [2, 6, 3, 1, 8, 4]

# add items at the end of the list.

my_number.append(0)

my_number.append(5)

# sorts the list, default - ascending.

my_number.sort()

size = 0

while size < len(my_number):

   print(my_number[size])

   size += 1

Explanation:

The tuple and list data structures are ordered, using indexes to locate items in its container.

The family.py file uses the for-loop to iterate and print the family names in the tuple.

The work-list.py file contains a list of integers which is modified by adding items at the end of the list with the append method and a prints all the items using a while-loop.

Can you think of other businesses that might benefit from using voice response this system?​

Answers

Answer:

call centers benfit big in this field

Explanation:

Write a program to prompt the user for hours worked to compute a gross pay for an employee, and he is paid 100/hour. If he worked for 50 hours in a week then he will get overtime pay for the extra hours he worked i.e. he will be paid 1.5 times of M100.00 for 10 hours (50-40)

Answers

Answer:

rate = 100

hours_worked = eval(input('enter number of hours worked'))

gross_pay = hours_worked * rate

if hours_worked <= 40 :

print(gross_pay)

else:

print(gross_pay + (1.5*rate*(hours_worked -40)))

Explanation:

Using python 3 :

The rate of pay is defined using the rate variable

The user is the prompted to enter the number of hours worked.

Gross_pay gives the mathematical evaluation of the amount paid base in rate and hours worked.

Since hours beyond 40 are paid as overtime. Then we have to add that to those who worked above 40 hours.

If hours_worked is 40 and below, then use gross pay

If gross pay is above 40 ; then the overtime fee is added to gross pay using the rate provided.

In python, sorry if it’s blurry

Answers

Answer:

nice

Explanation:

lst = [[6,-3,8,0,5,-1,2,-2],[-7,4,3,-5,8,9,1,6]]

neg_values = 0

for x in lst:

   for y in x:

       if y<0:

           neg_values += 1

print(neg_values)

I wrote my code in python 3.8. I hope this helps

17.8.1: Writing a recursive math function. Write code to complete raise_to_power(). Note: This example is for practicing recursion; a non-recursive function, or using the built-in function math.pow(), would be more common.

Answers

Answer:

The recursion function is as follows:

def raise_to_power(num, power):

if power == 0:

 return 1

elif power == 1:

 return num

else:

 return (num*raise_to_power(num, power-1))

Explanation:

This defines the function

def raise_to_power(num, power):

If power is 0, this returns 1

if power == 0:

 return 1

If power is 1, this returns num

elif power == 1:

 return num

If otherwise, it calculates the power recursively

else:

 return (num*raise_to_power(num, power-1))

Which measurement symbol is this?
PLS HELP

Answers

Answer:

Foot.

Explanation:

Hope this helps!

What is a
a program​

Answers

Answer:

-a collection of related measures or activities aimed at achieving a specific long-term goal.

-a set of pre-programmed software instructions for controlling the operation of a computer or other machine

-provide (a computer or other machine) with pre-programmed instructions for completing a task automatically

-Organize according to a schedule or plan.

Explanation:

Answer:

A program is an set of instructions given by a computer to perform particular task

LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed
a. print

b. random

c. else

d. while

Answers

Question:

LaToya is creating a program that will teach young children to type. What keyword should be used to create a loop that will print “try again” until the correct letter is typed

Answer:

d. while ✓

Explanation:

The while loop is used to repeat a section of code an unknown number of times until a specific condition is met.

[tex] \\ \\ [/tex]

Hope it helps

-------☆゚.・。゚ᵴɒƙυᴚᴀ_ƨȶäᴎ❀

what would be the result of running these two lines of code


Ski

Surf

Jog

Hike

Answers

Answer:

Jog

Explanation:

The variable options is a list containing 5 string values

options = ["ski", "surf", "jog", "bike", "hike"]

Indexing in python starts from 0 ; hence the index values of the list values are :

0 - ski

1 - surf

2 - jog

3 - bike

4 - hike

The statement ;

print(options[2]) means print the string at index 2 in the list named options

The string at index 2 is jog ;

Hence, the string jog is printed.

Which of the following describes an iteration in a computer program?

Answers

Answer:

a set of instructions that can be run multiple times throughout a program

Explanation:

Advancements in technology often make computer
hardware and software more convenient to use as
well as able to fit a variety of budgets. As
technology advances, it usually gets
smaller and less expensive.
larger and more expensive.

Answers

Answer: smaller and less expensive.

Explanation:

As technology advances, the architects of the devices that we use are getting more efficient in the production of said devices such that they are using better materials and techniques in production.

This has led to a situation where devices are increasingly getting smaller in size and cheaper to afford as well. For instance, compare the computers of today to those of the 90's. We have laptops now which are really slim and cost a fraction of what the bulky computers of those days cost.

Blank Are input instructions you give to a computer

Answers

Explanation:

A computer is a machine that can be programmed to accept data (input), process it into useful information (output), and store it away (in a secondary storage device) for safekeeping or later reuse. The processing of input to output is directed by the software but performed by the hardware.

Question # 4
Fill in the Blank
Complete the following sentence.
The first email was sent in
.

Answers

Answer:

1971

Explanation:

If there is more detail needed i'm sorry

Answer:

1971

Explanation:

#Nova

Have a great day!

:)

Write code to take a String input from the user, then print the first and last letters of the string on one line. Sample run: Enter a string: surcharge se Hint - we saw in the lesson how to get the first letter of a string using the substring method. Think how you could use the .length() String method to find the index of the last character, and how you could use this index in the substring method to get the last character.

Answers

Answer:

//import the Scanner class to allow for user input

import java.util.Scanner;

//Begin class definition

public class FirstAndLast{

   //Begin the main method

    public static void main(String []args){

       

       

       //****create an object of the Scanner class.

       //Call the object 'input' to receive user's input

       //from the console.

       Scanner input = new Scanner(System.in);

       

       //****create a prompt to tell the user what to do.

       System.out.println("Enter the string");

       

       //****receive the user's input

       //And store it in a String variable called 'str'

       String str =  input.next();

       

       //****get and print the first character.

       //substring(0, 1) - means get all the characters starting

       //from the lower bound (index 0) up to, but not including the upper

       //bound(index 1).

       //That technically means the first character.

       System.out.print(str.substring(0,1));

       

       //****get and print the last character

       //1. str.length() will return the number of character in the string 'str'.

       //This is also the length of the string

       //2. substring(str.length() - 1) - means get all the characters starting

       // from index that is one less than the length of the string to the last

       // index (since an upper bound is not specified).

       // This technically means the last character.

       System.out.print(str.substring(str.length()-1));

       

       

       

    }  // end of main method

   

} //end of class definition

Explanation:

The code has been written in Java and it contains comments explaining important parts of the code. Kindly go through the comments.

The source code and a sample output have also been attached to this response.

To run this program, copy the code in the source code inside a Java IDE or editor and save it as FirstAndLast.java

____________ RAM resides on the processor

Answers

Answer:

Brain of the computer i.e Random Access memory RAM resides on the processor

Explanation:

Brain of the computer i.e Random Access memory RAM resides on the processor. RAM is located in the central processing unit (CPU) also called processor which is located within the motherboard of the computer. It carry out the commands.

Other Questions
Either you are for us or against us, is an example of a:Select one:A. black-or-white fallacy.B. false cause.C. division fallacy.D. composition fallacy. A mechanical system has 3 subsystems in series, each has reliabilities 98%, 96% and 94%, respectively. What is the overall reliability of the system Before you see a question on the AP Psychology exam, it is usually pretested on a group of college students taking an introductory course in psychology. This group of people are referred to as the The paroxysmal stage of whooping cough is characterized by _____. a. mild, dry, persistent cough b. a migraine headache c. violent coughing d. pseudomembrane forming in throat Simplify the following polynomial and write the answer in standard form When closing a direct request, youa. indicate the consequences of a failure to reply.b. mention your own qualifications or status.c. request a specific response and mention the time limits.d. thank the reader in advance for helping you. The area of a circle is increasing at a constant rate of 279 square feet per minute. At the instant when the radius of the circle is 66 feet, what is the rate of change of the radius? Round your answer to three decimal places. which phrase best completes the diagram I need help ASAP PLEASEWhat is the sum of the first 47 terms of the sequence?-215,-201,-187,-173,... Situation:Carla is in charge of planning a professional conference. The hotel where the conference willbe held has written her a letter announcing a cost increase, effective immediately, for some oftheir services. The increase will affect the budget for the conference. Carla has written a replyto the hotel manager.American Association of Carpet Weavers2305 Threadbare WayCharlottesville, VA 22902July 26th, 2018Robert Rodriguez, ManagerFour Star HotelDallas, Texas 78208Dear Mr. Rodriguez:I am writing to respond to your letter announcing the price increase for hotelservices. The professional association that I represent is planning a nationalconference at your hotel that we are scheduled four months from now. Howcan we plan a conference of this size if you up and change your prices without What is the value of(5x2)3 + 16y + 4y for x = 2 and y = 3? Help me with this please For most firms, the cost of capital decreases to a low point as the firm ________ debt financing. At some point beyond this optimal level, the cost of capital increases as the amount of debt ________. If your end product is 1.5 moles of KMnO4, how many moles of manganese oxide were used in the reaction? The equation for the production of potassium permanganate is as follows: 2 MnO2 + 4 KOH + O2 2 KMnO4 + 2 KOH + H2 You must show all work Answer for brainlest Which structure will sometimes disappear in adultsA) Thymus B) SpleenC) PancreasD) Sinus Please help 15 points!!! pa help pob. pambansang kaunlaran d. gawaing pansarili22. Ano ang gawaing pansibiko ang inilalarawan sa pahayag: Pagsasagawa ng libreng operepara sa mga may biyak na labi,a. kalikasan b. kalusugan pampalakasan d. edukasyon23. Ano ang gawaing pansibiko ang inilalarawan sa pahayag:Pagbubuo ng liga para sa paglalarosa inyong barangay.a. kalikasan b. kalusugan c. pampalakasan d. edukasyon24. Ano ang gawaing pansibiko ang inilalarawan sa pahayag: Pagsasagawa ng pilaban sapagpipinta ng mga batang lansangan.a. kalikasan b. kalusugan c. pampalakasan d. edukasyon25. Ano ang gawaing pansibiko ang inilalarawan sa pahayag: Pagsama sa pagtatanim ng malilina puno saSierra Madre, The Cold War timeline l WILL GIVE BRAINLIEST...... find the range of X