subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Which of the following kinds of programs displays an online advertisement in a banner or pop-up window on webpages, email, or other internet service? e
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
What are two of the most common reasons that peolpe who need mental health care do not access it?
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
List the five on-board vehicle subsystems
Answers: 1
question
Computers and Technology, 22.06.2019 22:30
Who needs to approve a change before it is initiated? (select two.) -change board -client or end user -ceo -personnel manager -project manager
Answers: 1
You know the right answer?
Acertain robot can perform only 4 types of movement. it can move either up or down or left or right....
Questions
question
Spanish, 14.12.2020 22:20
question
Mathematics, 14.12.2020 22:20
question
Computers and Technology, 14.12.2020 22:20
Questions on the website: 13722363