2023 My smart TV has an onscreen keyboard feature that allows me to use the remote control to | Assignment Collections

Computer Science 2023 PYTHON : Smart TV Blues

2023 My smart TV has an onscreen keyboard feature that allows me to use the remote control to | Assignment Collections

 

My smart TV has an onscreen keyboard feature that allows me to use the remote control to enter passwords for online services (e.g., Netflix), enter the names of movies to search for, etc. This keyboard resembles the following:

  a b c d e f g   h i j k l m n   o p q r s t u   v w x y z 0 1   2 3 4 5 6 7 8   9 Delete, Enter, etc.    

Unfortunately, my remote control is severely broken due to a coffee spill; the up and down buttons don’t work at all, so I can only move between characters on the keyboard using the left and right buttons. Fortunately, there’s a workaround (sort of): moving off the left edge of a row takes you to the row above, and moving off the
right edge of a row takes you to the row below. This is a nuisance. Being an engineer, I want to measure the “annoyance factor” for each password or movie title that I need to enter using this keyboard (and broken remote).

My annoyance factor is the total number of rows that I have to move between in order to enter a particular string.

For example, consider the password “avalon31”:
I begin at ‘a’. The first character doesn’t count towards the annoyance factor, which is currently 0.

Moving to ‘v’ requires me to move three rows down, adding 3 to my annoyance factor.

Moving back to ‘a’ adds another 3 to my annoyance factor, since I have to move three rows back up.

The letter ‘l’ is one row down from ‘a’, so my annoyance factor only increases by 1 this time.
‘o’ is one row down from ‘l’, adding another 1 to my annoyance factor.
‘n’ is one row back up, so my annoyance factor increases by 1.
‘3’ is three rows below ‘n’, adding another 3 to my annoyance factor.

Finally, ‘1’ is one row above ‘3’, adding a final 1 to my annoyance factor.

Thus, my final annoyance factor is 3 + 3 + 1 + 1 + 1 + 3 + 1, or 13.

Complete the annoyanceFactor() function, which takes a single string of lowercase letters and digits representing the string that I want to enter. The function returns the total number of row changes I need to make.

As a general solution strategy, consider the following:

1. Create a list that holds the letters and digits on the keyboard shown above (Hint: Use Python’s list() function on the concatenation of string.ascii_lowercase and string.digits).

2. Identify the first character’s row number. A character’s row number is equal to its list index divided by 7 (using floor division). For example, ‘c’ (index 2) is in row 0 (2 // 7 is 0), and ‘y’ (index 24) is in row 3 (24 // 7 is 3). This value will be our starting row. (Hint: Python lists have an index() method that is extremely useful here)
 

3. For each remaining character in the string:
(a) Calculate the current character’s row number using the formula from Step 2.
(b) Use Python’s abs() function to calculate the absolute difference between the new character’s row number and our current row number. Add that value to the “annoyance factor” variable.
(c) Set the current row to the new character’s row number.

Examples:
Method Call    Expected Output
annoyanceFactor(“avalon31”) 13
annoyanceFactor(“23fish”)    7
annoyanceFactor(“waterbed”) 11
annoyanceFactor(“ncc1701a”)    9
annoyanceFactor(“excelsior”)    10

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational