1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
topjm [15]
3 years ago
12

Python 4.5 code practice

Computers and Technology
1 answer:
Arada [10]3 years ago
3 0

Answer:

add the question

Explanation:

You might be interested in
Web sites use _____ to track users while they are on the site.
Liula [17]
These are files called cookies. =)
6 0
3 years ago
A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
stepladder [879]

Answer:

Explanation:

The following code is written in Python. It is a recursive function that tests the first and last character of the word and keeps checking to see if each change would create the palindrome. Finally, printing out the minimum number needed to create the palindrome.

import sys

def numOfSwitches(word, start, end):

   if (start > end):

       return sys.maxsize

   if (start == end):

       return 0

   if (start == end - 1):

       if (word[start] == word[end]):

           return 0

       else:

           return 1

   if (word[start] == word[end]):

       return numOfSwitches(word, start + 1, end - 1)

   else:

       return (min(numOfSwitches(word, start, end - 1),

                   numOfSwitches(word, start + 1, end)) + 1)

word = input("Enter a Word: ")

start = 0

end = len(word)-1

print("Number of switches required for palindrome: " + str(numOfSwitches(word, start, end)))

3 0
3 years ago
Which windows command always navigates the command-line interface back to the root directory?
Pie
The answer is "cd \".
5 0
3 years ago
Can the police track a phone if you post something on a social media platform even if the SIM card is out and location services
IgorLugansk [536]
Yes by using the internet address
6 0
3 years ago
Read 2 more answers
Excel makes reading formulas simpler by ____ each cell reference in the formula and its corresponding cell in the worksheet.
Bess [88]

The correct answer to this question is color coding.

Excel makes formulas easier to identify because they color code the cell reference with the corresponding cell in the worksheet. For example, if cell A1 in the formula is in blue, then the border around A1 will also be blue.

4 0
4 years ago
Other questions:
  • Select the correct answer.
    15·1 answer
  • Which of the following phrases describes top-down processing
    8·1 answer
  • How would you determine if your earned credits would transfer to a regionally accredited school?
    14·2 answers
  • Why would you choose to use Word Art rather than a colored font when creating a Google Slides presentation? There are more fonts
    13·1 answer
  • A database record can best be described as:
    11·1 answer
  • 97 points pleaseeee helpppp
    8·2 answers
  • Help mah!!! T^T please and thank you mate
    5·2 answers
  • NO LINKS<br> Do you need to pay monthly to stream on Twitch?
    5·1 answer
  • DOES ANYONE KNOW COMPUTER SCIENCE?
    8·1 answer
  • What is wrong here??
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!