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
A company requires an Ethernet connection from the north end of its office building to the south end. The distance between conne
BlackZzzverrR [31]

Answer:

A company requires an Ethernet connection from the north end of its office building to the south end. The distance between connections is 161 meters and will need to provide speeds of up to 10 Gbps in full duplex mode. Which of the following cable combinations will meet these requirements?

ANSWER: Use multi-mode fiber optic cable

Explanation:

MULTI-MODE FIBER OPTIC CABLE

For Ethernet distances up to 100 meters, the Copper CATX cable will do just fine. In the question, we are dealing with a distance of up to 161 meters, so we need an Ethernet extension. LAN extension over fiber optic cable with media converter can be used to convert the Ethernet cable runs from copper to fiber. Multi-mode fiber has a range of 550 meters for 10/100/1000 Ethernet links.

Multi-mode optical fiber is commonly used for communication over short distances, like within a building or on a campus. They are capable of data rate of up to 100 Gbps, which surpasses the requirements in this question. They are more economical in this case as they are not as expensive a the single-mode optical fiber cable. Fiber optic cable has the advantage of being immune to electromagnetic interferences, spikes, ground loops, and surges. This makes it more suited for this purpose.

7 0
2 years ago
1.2.2: Output variable value. Jump to level 1 Write a statement that outputs variable userAge. End with a newline. 1 2 3 4 5 6 7
serg [7]

Answer:

cout<<"User Age is ="<<userAge<<endl;

Explanation:

#include<iostream>

using namespace std;

int main()

{

int userAge;

cin >> userAge; // Program will be tested with values: 15, 40.

cout<<"User Age is ="<<userAge<<endl;

return 0;

}

5 0
2 years ago
RFID tags are used in secure environments primarily due to the fact they are impossible to counterfeit.
denis23 [38]

Answer: True

Explanation:

 Yes, the given statement is true that the RFID tags are basically used in the secure system because it is impossible to counterfeit.

RFID basically stand for the radio frequency identification that provide a method to retrieve the data or information quickly from the system. It basically used as radio wave technology in which we can easily track the objects and people by using proper programmed data.

The tag is basically placed in the object for unique identification. There are basically two types of tags in the RFID that is active and passive.

4 0
2 years ago
Following are groups of three​ phrases, which group states three ways to improve your​ concentration?
andreev551 [17]
I believe its <span>c-set up a study​ space, preview your​ materials, create a routine</span>
3 0
1 year ago
Please help, Tech class!!
IRISSAK [1]

Answer:

Explanation:

1=A

2=A

3=A

4=True

5=A

6=D

7=D

8=B

9=True

10=C

3 0
2 years ago
Other questions:
  • The Spinning Jenny reduced the number of workers necessary to _______. a.remove cotton seeds from fibers b.pump water from the m
    7·1 answer
  • ____ refers to typing your entire e-mail message or discussion group post using only capital letters.
    15·1 answer
  • PLEASE HELP!! WILL GIVE BRAINLIEST!!
    15·2 answers
  • Question 1 :Which type of unshielded twisted pair (UTP) cable is commonly used for 1000BASE-T Ethernet networks and is often mad
    8·1 answer
  • An entrepreneur is opening a computer store in a small town and wants to display a few laptops in the store, but is concerned ab
    11·2 answers
  • E xercise 17.2.4: The following is a sequence of undo-log records written by two transactions T and U: &lt; START T&gt;; ; &lt;
    15·1 answer
  • A 1.17 g sample of an alkane hydrocarbon gas occupies a volume of 674 mL at 28°C and 741 mmHg. Alkanes are known to have the gen
    14·1 answer
  • 1.the following code example would print the data type of x, what data type would that be?
    12·1 answer
  • Which of the following statements is true regarding ARPANET? Select 3 options. It was a product of Bell Laboratories and was int
    9·1 answer
  • A chain of dry-cleaning outlets wants to improve its operations by using data from
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!