Computers and Technology
Computers and Technology, 12.11.2019 22:31, famouzgal

Acertain robot can perform only 4 types of movement. it can move either up or down or left or right. these movements are represented
by ’u’, ’d’, ’l’, ’r’. assume all these movements to be of unit distance. write a function named theroundtrip that takes all the
movements the robot made in a day as input and output true of bool type if the robot returned to its starting position after its journey.
otherwise, return false. if the input is bad print the message "bad input".
sample input 1:
l, r,l, r
sample output 1:
true
sample input 2:
u, l,d, r

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, alyssatamayo641
Speed is how fast an object moves a certain distance within a length of time. how is speed calculated? a) distance/time b) time/distance c) velocity/time d) distance x time
Answers: 1
image
Computers and Technology, 21.06.2019 23:00, zahraa244
Describe in pseudocode an algorithm that given an integer n and a linked list of elements increases the linked list by a factor of n by replacing each element in the original list with n copies of that element. for example, if l: [18, 7, 4, 24, 11] and n = 3 the resulting list should be l: [18, 18, 18, 7, 7, 7, 4, 4, 4, 24, 24, 24, 11, 11, 11]. if the value of n is less than or equal to 0, the list should be empty after the call. what’s the running time of your algorithm?
Answers: 3
image
Computers and Technology, 22.06.2019 10:30, icantspeakengles
Aconstruction company is creating a powerpoint presentation describing how they calculate costs during each construction step. they plan to email this presentation to clients. the individual clients will be watching the presentation slide show on their own personal computers. what is the most important formatting step the company should take to make the text readable and pleasing to the eye?
Answers: 2
image
Computers and Technology, 22.06.2019 21:00, daniella0123
Simon says is a memory game where "simon" outputs a sequence of 10 characters (r, g, b, y) and the user must repeat the sequence. create a for loop that compares the two strings starting from index 0. for each match, add one point to userscore. upon a mismatch, exit the loop using a break statement. assume simonpattern and userpattern are always the same length. ex: the following patterns yield a userscore of 4: simonpattern: rrgbryybgy userpattern: rrgbbrybgy
Answers: 2
Do you know the correct answer?
Acertain robot can perform only 4 types of movement. it can move either up or down or left or right....

Questions in other subjects: