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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, kkeith121p6ujlt
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
image
Computers and Technology, 22.06.2019 16:00, sdonachy7
You have inserted new slides based on a word outline. how do you format these new slides to match the powerpoint presentation formatting? a. select all slides in the presentation and click format on the home tab. b. select the new slides and click reset on the home tab. c. select all slides in the presentation and click reset on the home tab. d. select the new slides and click format on the home tab.
Answers: 3
image
Computers and Technology, 22.06.2019 22:50, youngboymark123
Assume the existence of a bankaccount class. define a derived class, savingsaccount that contains two instance variables: the first a double, named interestrate, and the second an integer named interesttype. the value of the interesttype variable can be 1 for simple interest and 2 for compound interest. there is also a constructor that accepts two parameters: a double that is used to initialize the interestrate variable, and a string that you may assume will contain either "simple", or "compound", and which should be used to initialize the interesttype variable appropriately. there should also be a pair of functions getinterestrate and getinteresttype that return the values of the corresponding data members (as double and int respectively).
Answers: 2
image
Computers and Technology, 23.06.2019 15:30, jokerr6323
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e. g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
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 in other subjects: