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
HACTEHA [7]
2 years ago
5

If Tracy starts on the left edge of the canvas and moves forward 50 pixels, how many times will this code need to be repeated to

have Tracy reach the right edge of the canvas?
answer choices
4 times

8 times

10 times

50 times
Computers and Technology
1 answer:
dexar [7]2 years ago
6 0

Answer:

4 times.

Explanation:

When she begins at the left corner of the canvas and pushes 50 pixels away, then the following program must be executed four times in order for her to reach the desired edge of the canvas because it is necessary to execute that following code to execute at the given times to reach the required side while moves 50 pixels away.

You might be interested in
What is the full form of GUI​
77julia77 [94]

Answer:

(GUI) stands for Graphical User Interface

3 0
2 years ago
Read 2 more answers
I want to discard my old computer and want to securely erase the data from my hard drive what is the process called.
laiz [17]
I believe the process is called High Level Format.
8 0
3 years ago
Read 2 more answers
Which of the following is an example of a real-world logic problem for which computers may be used?
8_murik_8 [283]

Answer:

I'd say it's most likely (A) Banking transactions performed at ATMs.

Explanation:

The other three are things that you would need a human for.

4 0
3 years ago
Write two methods: encrypt and decrypt. encrypt should #take as input a string, and return an encrypted version #of it according
Harman [31]

Answer:

The code is given below with appropriate comments

Explanation:

CIPHER = (("D", "A", "V", "I", "O"),

         ("Y", "N", "E", "R", "B"),

         ("C", "F", "G", "H", "K"),

         ("L", "M", "P", "Q", "S"),

         ("T", "U", "W", "X", "Z"))

# Add your code here!

def encrypt(plaintext):

   theList = []

   for char in plaintext:

       if char.isalpha():

           char = char.upper()

           if char == "J":

               char = "I"

           theList.append(char)

   if len(theList) % 2 == 1:

       theList.append("X")

   for i in range(0, len(theList), 2):

       if theList[i] == theList[i + 1]:

           theList[i + 1] = "X"

       findex = [-1, -1]

       sindex = [-1, -1]

       for j in range(len(CIPHER)):

           for k in range(len(CIPHER)):

               if theList[i] == CIPHER[j][k]:

                   findex = [j, k]

               if theList[i + 1] == CIPHER[j][k]:

                   sindex = [j, k]

       # same row

       if (findex[0] == sindex[0]):

           findex[1] += 1

           sindex[1] += 1

           if findex[1] == 5:

               findex[1] = 0

           if sindex[1] == 5:

               sindex[1] = 0

           theList[i] = CIPHER[findex[0]][findex[1]]

           theList[i + 1] = CIPHER[sindex[0]][sindex[1]]

       # same column

       elif (findex[1] == sindex[1]):

           findex[0] += 1

           sindex[0] += 1

           if findex[0] == 5:

               findex[0] = 0

           if sindex[0] == 5:

               sindex[0] = 0

           theList[i] = CIPHER[findex[0]][findex[1]]

           theList[i + 1] = CIPHER[sindex[0]][sindex[1]]

       else:

           theList[i] = CIPHER[findex[0]][sindex[1]]

           theList[i + 1] = CIPHER[sindex[0]][findex[1]]

   return "".join(theList)

def decrypt(ciphertext):

   theString = ""

   findex = [-1, -1]

   sindex = [-1, -1]

   for i in range(0, len(ciphertext), 2):

       for j in range(len(CIPHER)):

           for k in range(len(CIPHER)):

               if ciphertext[i] == CIPHER[j][k]:

                   findex = [j, k]

               if ciphertext[i + 1] == CIPHER[j][k]:

                   sindex = [j, k]

       if (findex[0] == sindex[0]):

           findex[1] -= 1

           sindex[1] -= 1

           if findex[1] == -1:

               findex[1] = 4

           if sindex[1] == -1:

               sindex[1] = 4

           theString += CIPHER[findex[0]][findex[1]]

           theString += CIPHER[sindex[0]][sindex[1]]

       # same column

       elif (findex[1] == sindex[1]):

           findex[0] -= 1

           sindex[0] -= 1

           if findex[0] == -1:

               findex[0] = 4

           if sindex[0] == -1:

               sindex[0] = 4

           theString += CIPHER[findex[0]][findex[1]]

           theString += CIPHER[sindex[0]][sindex[1]]

       else:

           theString += CIPHER[findex[0]][sindex[1]]

           theString += CIPHER[sindex[0]][findex[1]]

   return theString

# Below are some lines of code that will test your function.

# You can change the value of the variable(s) to test your

# function with different inputs.

#

# If your function works correctly, this will originally

# print: QLGRQTVZIBTYQZ, then PSHELXOWORLDSX

print(encrypt("PS. Hello, worlds"))

print(decrypt("QLGRQTVZIBTYQZ"))

5 0
3 years ago
Is technology oversold
NISA [10]

Answer:

no

Explanation:

3 0
2 years ago
Read 2 more answers
Other questions:
  • A college asks you to write about a novel that is meaningful to you. What should you include in this essay?
    10·1 answer
  • Which of the following is not a common network architecture type?
    9·1 answer
  • Convert to octal. Convert to hexadecimal. Then convert both of your answers todecimal, and verify that they are the same.(a) 111
    12·1 answer
  • Two Technicians are discussing Tire Fitment information.
    7·1 answer
  • The CUSTOMERS and SALES tables contain these columns:
    6·1 answer
  • Tom's Art Supplies used to sell art supplies through mail order catalogs, but the company's order takers often had difficulty de
    9·1 answer
  • What would be the total width of the div in the code below?
    11·2 answers
  • Who still plays old Nintendo 64 games?
    6·2 answers
  • Write a class called TextProcessor that implements the methods listed below. Your implementation may use the charAt() and length
    14·1 answer
  • Which of the following is NOT a function of a Web Browser?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!