subject
Computers and Technology, 15.10.2020 17:01 u8p4

You are playing a video game under the following idealized conditions. The computer memory is unbounded and you have no time limit for finishing the game. The game board is the set of points in the plane with integer coordinates and time moves in discrete integer steps. There is a hidden submarine: you do not not know its location, you do not know its speed and you do not know its direction of motion. The speed and direction of motion do not change throughout the game. The speed is a natural number and the direction of motion is either up, down, left or right. For example, the submarine could start at (1,3) have speed 6 and move right. Then at step 0 it is at (1, 3), at step 1 it is at (7, 3), at step 2 it is at (13, 3) and so on. At every step you get to zap a point: you enter the coordinates and if the submarine is at that point, at that time step, you will destroy it. Of course, there is no point zapping a position before it gets there or after it leaves. Give a strategy or scheme that is guaranteed to get the submarine at some nite stage. Important : you do not know where it started, you do not not know its direction and you do not know its speed; you only know that the speed and direction do not change.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 24.06.2019 14:40
Create a function (prob3_6) that will do the following: input a positive scalar integer x. if x is odd, multiply it by 3 and add 1. if the given x is even, divide it by 2. repeat this rule on the new value until you get 1, if ever. your program will output how many operations it had to perform to get to 1 and the largest number along the way. for example, start with the number 3: because 3 is odd, we multiply by 3 and add 1 giving us 10. 10 is even so we divide it by 2, giving us 5. 5 is odd so we multiply by 3 and add one, giving us 16. we divide 16 (even) by two giving 8. we divide 8 (even) by two giving 4. we divide 4 (even) by two giving 2. we divide 2 (even) by 2 to give us 1. once we have one, we stop. this example took seven operations to get to one. the largest number we had along the way was 16. every value of n that anyone has ever checked eventually leads to 1, but it is an open mathematical problem (known as the collatz conjectureopens in new tab) whether every value of n eventually leads to 1. your program should include a while loop and an if-statement.
Answers: 3
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
Answers: 1
question
Computers and Technology, 25.06.2019 01:30
The physical parts or components of a computer system is called .
Answers: 1
You know the right answer?
You are playing a video game under the following idealized conditions. The computer memory is unboun...
Questions
question
Mathematics, 22.12.2021 14:00
question
English, 22.12.2021 14:00
question
Social Studies, 22.12.2021 14:00
Questions on the website: 13722367