subject

"i was driving on the highway the other day recently and i happened to notice my odometer. like most odometers nowadays, it shows six digits, in whole miles only -- no tenths of a mile. so, if my car had 300,000 miles, for example, i'd see 3-0-0-0-0-0. and that's all. until i drove another mile, at which point it would read 3-0-0-0-0-1. ""now, what i saw that day was very interesting. i noticed that the last 4 digits were palindromic, that is they read the same forwards as backwards. for example, "5-4-4-5" is a palindrome. so, my odometer could have read 3-1-5-4-4-5, with those last four digits, starting with the units, then the tens, then the hundreds, and finally the thousands, being the palindrome. ""one mile later, the last 5 numbers were palindromic. for example, it could have read 3-6-5-4-5-6. ""one mile after that, the middle 4 out of 6 numbers were palindromic. so, the first and last numbers weren't involved in the palindrome, but the middle 4 were palindromic. ""and you ready for this? one mile later, all 6 were palindromic! for example, 2-1-3-3-1-2. ""i noticed that the last 4 digits were palindromic. i drove a mile, and the last 5 were palindromic. i drove another mile and the middle 4 were palindromic, and the ends were not involved. and then one mile later, all 6 digits were palindromic."the question is, what did the driver see on the odometer when they first looked? okay, so what do you have to do? your goal for this is to write a program in python that solves this puzzle. to do this you will use a loop that tries every number between 1 and until it finds one that meets all of the conditions. so really you just need to specify the conditions in the question as boolean expression, put them into a bunch of if statements, and then put all of that into a while loop.2.first see if you can design an algorithm that takes as input a 9 digit number where no digit appears twice and produces as output an arrangement of the same 9 digits corresponding to the next highest number. if no such number exists, the algorithm should indicate this. so for example if the input is 781623954 the output would be 781624359. you can use bulleted english to describe your algorithm

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 23.06.2019 01:20
Me with this program in c++ ! computers represent color by combining sub-colors red, green, and blue (rgb). each sub-color's value can range from 0 to 255. thus (255, 0, 0) is bright red. (130, 0, 130) is a medium purple. (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (in other word, equal amounts of red, green, blue yield gray).given values for red, green, and blue, remove the gray part. ex: if the input is 130 50 130, the output is: 80 0 80. thus, find the smallest value, and then subtract it from all three values, thus removing the gray.
Answers: 3
question
Computers and Technology, 23.06.2019 09:30
[java] create an application called registrar that has the following classes: a. a student class that minimally stores the following data fields for a student: - name - student id number - number of credits - total grade points earned and this class should also be provides the following methods: - a constructor that initializes the name and id fields - a method that returns the student name field - a method that returns the student id field - methods to set and retrieve the total number of credits - methods to set and retrieve the total number of grade points earned. - a method that returns the gpa (grade points divided by credits) b. an instructor class that minimally stores the following data fields for an instructor: - name - faculty id number - department the following methods should be provided: - a constructor that initializes the name and id fields - methods to set and retrieve the instructor’s department. c. a course class that minimally stores the following data for a course: - name of the course- course registration code- maximum number of 35 students- instructor- number of students- students registered in the course (an array)the following methods should also be provided: - a constructor that initializes the name, registration code, and maximum number of students- methods to set and retrieve the instructor- a method to search for a student in the course; the search should be based on an id number.- a method to add a student to the course. if the course is hill, then an exception with an appropriate message should be raised (try creating your own exception class for this). also, be sure that the student is not already registered in the course. the list of students should be in the order that they registered.- a method to remove a student from the course. if the student is not found, then an exception with an appropriate message should be raised (use the same exception class mentioned a method that will allow course objects to be output to a file using object serialization- a method that will allow course objects to be read in from a file created with object serializationyou will note that the student and instructor classes described above have some commonality. create aperson class that captures this commonality and uses it as a base class for student and instructor. this class should be responsible for the name and id fields and also provide atostring method that returns a string of the form name, id. this will be the inheritedtostring method for the student and instructor classes.1. draw a uml diagram for diss application.2. implement the previous classes in java. write a main program that can serve as a test class that tests all of the methods created and demonstrates that they are working
Answers: 2
question
Computers and Technology, 23.06.2019 13:00
Which one of the following voltages should never be measured directly with a vom? a. 1200 v b. 500 v c. 800 v d. 100v
Answers: 2
You know the right answer?
"i was driving on the highway the other day recently and i happened to notice my odometer. like most...
Questions
question
Social Studies, 12.07.2019 07:40
Questions on the website: 13722363