answer.
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
Svetach [21]
2 years ago
11

The code below assigns the 5th letter of each word in food to the new list fifth. However, the code currently produces errors. I

nsert a try/except clause that will allow the code to run and produce of list of the 5th letter in each word. If the word is not long enough, it should not print anything out. Note: The pass statement is a null operation; nothing will happen when it executes.
food = ["chocolate", "chicken", "corn
fifth = []
for x in food:
fifth.append(x[4])
Computers and Technology
1 answer:
Mrrafil [7]2 years ago
6 0

Answer:

Answered below

Explanation:

foods = ["chocolate", "chicken", "corn"]

fifth_char = []

for food in foods:

"""Add a try statement to add fifth character to fifth_char list. If word is not long enough, the except part executes the the pass and nothing is printed.""'

try:

fifth_char.append(food[4])

except:

pass

#print out elements in new list

for c in fifth_char:

print(c)

You might be interested in
Danielle, a help desk technician, receives a call from a client. In a panic, he explains that he was using the Internet to resea
marysya [2.9K]

Answer:

The customer's browser has been hijacked by some attackers may be.

Explanation:

According to customer's explanation there is  possibility that that his data may be stolen and he has to disconnect computer from network and then call given number in order to get back his data.

5 0
2 years ago
Interpretations of​ Moore's law assert​ that:
jonny [76]

Answer:

Option (D) is the correct answer of this question.

Explanation:

Moore's Law relates to Moore's theory that the number of transistors on a microchip doubles every two years while device costs are halved.

Interpretations  of Moore's law assert the computing power doubles every 18 months.The Moore's Law theory states that development is exponential.Moore's Law states that every couple of years we should expect our computers to increase their speed and capacity and we'll pay less for them.h

Option(A),Option(B) ,Option(c) and option(E) do not belongs to Moore's law  so these options are incorrect options.

5 0
1 year ago
What is a key differentiator of Conversational AI? It implements Natural Language Understanding (NLU) and other human-like behav
Pavel [41]

Answer:

c

Explanation:

4 0
2 years ago
Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
alekssr [168]

Answer:

"public static void passAList(ArrayList<Integer> myList, int[] intArr)", is the correct answer for the above question.

Explanation:

Missing information :

  • The option is missing but the question states "choose from the following". The correct defining syntax is defined above.

Detailed Explantion :

  • The above question asked about syntax which takes the value of list and array as an argument.
  • It is already defined in the above syntax.
  • And the value is passed by the user at the time of function call.
  • The array list is defined by the help of the ArrayList class and the array is defined by the help of the "[]" symbol.

3 0
2 years ago
When a visitor clicks the submit button on a form, the ______ of each form element is sent?
Bond [772]

In data presentation of computing systems and applications, when a user click the submit button on the form, the name-value pair of each form is sent because it is an open-ended data structure that allows future extension without altering existing code or data.

6 0
2 years ago
Read 2 more answers
Other questions:
  • Splunk uses ________ to categorize the type of data being indexed..
    11·2 answers
  • In 2–3 sentences, describe how you would change the background of a group of cell
    6·2 answers
  • __________ is the electronic transmission of signals for communications, which enables organizations to carry out their processe
    8·1 answer
  • A key field is used to _____. enter a password uniquely identify records merge data list the most important information
    12·2 answers
  • What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string,
    11·1 answer
  • The Web can play a significant role in making large amounts of information available to decision makers. Decision makers must be
    10·1 answer
  • If byte stuffing is used to transmit Data, what is the byte sequence of the frame (including framing characters)? Format answer
    6·1 answer
  • Create a generic class Box with a type parameter that simulates drawing an item at random out of a box. This class could be used
    7·1 answer
  • What does the binary odometer show about representing large numbers​
    15·1 answer
  • Dante has a worksheet shared with multiple users. He would like the ability to approve or reject changes that are made. Which fe
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!