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
The ratio of Chris an iood Dom's ages is
irinina [24]

Answer:

28 years

Explanation:

Let's represent present age of Chris and Dom as C and D respectively. Then since ratio of present age of Chris and Dom is 3:4. Therefore,

\frac{C}{D}=\frac{3}{4}

C=\frac{3}{4}D   ...(1)

Now, it is given that in 7 years their age ratio will become 4:5. Therefore,

\frac{C+7}{D+7}=\frac{4}{5}

5C+35=4D+28\\

Using value of C from equation(1),

5\times\frac{3}{4}D-4D=28-35

15D-16D=-28\\-D=-28\\ D=28

Thus, present age of Dom is 28 years.

8 0
2 years ago
Mary has been locked out of her account after failing to correctly enter her password three times. As the system administrator,
Digiron [165]
Oh hey lol yea yea lol I got the money back to me put on the phone so you know
7 0
2 years ago
Tyler wants to upgrade his very old operating system to the latest mac or microsoft operating system, but he cannot seem to inst
nordsb [41]
Every program has minimum system requirement, so at least His CPU is not good, or the amount of his RAM is too short to run the new version of OS.
6 0
2 years ago
Your southern region is not doing very well. You want to know why, so you ask for a special report showing the numbers for the s
Mila [183]

Answer:

D) Comparative

Explanation:

Comparative report is an analytical approach to report writing, where the aim is to determine the performance or contribution of individual constituents.

6 0
2 years ago
Moore’s Law is said to be more of a trend, rather than a representation of the actual number of transistors on a silicon chip. W
inna [77]

Answer:

Moores Law is defined to be the computer law which defines that the number of transistors on the integrated circuits will double time to time such as in an interval of 2 years. Moore's Law was coined by Intel employee, Gordon Moore.Moore's law is the observation that the number of transistors in a dense integrated circuit doubles about every two years. ... Moore's law describes a driving force of technological and social change, productivity, and economic growth.

Explanation:

Moore's Law is named after Intel cofounder Gordon Moore. He observed in 1965 that transistors were shrinking so fast that every year twice as many could fit onto a chip, and in 1975 adjusted the pace to a doubling every two years. ... Intel has suggested silicon transistors can only keep shrinking for another five years.Moore's law is the observation that the number of transistors in a dense integrated circuit doubles about every two years. ... Moore's law describes a driving force of technological and social change, productivity, and economic growth.Moore's law is the observation that the number of transistors in a dense integrated circuit doubles about every two years. ... Moore's law describes a driving force of technological and social change, productivity, and economic growth. Moore's law is an observation and projection of a historical trend.Moore's law is the observation that the number of transistors in a dense integrated circuit doubles about every two years. The observation is named after Gordon Moore, the co-founder of Fairchild Semiconductor and CEO of Intel, whose 1965 paper described a doubling every year in the number of components per integrated circuit,[2] and projected this rate of growth would continue for at least another decade.[3] In 1975,[4] looking forward to the next decade,[5] he revised the forecast to doubling every two years, a compound annual growth rate (CAGR) of 40%.[6][7][8]

The doubling period is often misquoted as 18 months because of a prediction by Moore's colleague, Intel executive David House. In 1975, House noted that Moore's revised law of doubling transistor count every 2 years in turn implied that computer chip performance would roughly double every 18 months (with no increase in power consumption).[9] Moore's law is closely related to MOSFET scaling, also known as Dennard scaling,[10] as the rapid scaling and miniaturization of silicon MOSFETs (metal-oxide-semiconductor field-effect transistors, or MOS transistors)[11][12] is the key driving force behind Moore's law.[10][13]

Moore's prediction proved accurate for several decades and has been used in the semiconductor industry to guide long-term planning and to set targets for research and development (R&D).[14] Advancements in digital electronics are strongly linked to Moore's law: quality-adjusted microprocessor prices,[15] memory capacity (RAM and flash), sensors, and even the number and size of pixels in digital cameras.[16] Digital electronics has contributed to world economic growth in the late twentieth and early twenty-first centuries.[17] Moore's law describes a driving force of technological and social change, productivity, and economic growth.[18][19][20][21]

Moore's law is an observation and projection of a historical trend. It is an empirical relationship and not a physical or natural law. Although the rate held steady from 1975 until around 2012, the rate was faster during the first decade. In general, it is not logically sound to extrapolate from the historical growth rate into the indefinite future. For example, the 2010 update to the International Technology Roadmap for Semiconductors predicted that growth would slow around 2013,[22] and in 2015, Gordon Moore foresaw that the rate of progress would reach saturation: "I see Moore's law dying here in the next decade or so."[23]

Microprocessor architects report that semiconductor advancement has slowed industry-wide since around 2010, below the pace predicted by Moore's law.[24] Brian Krzanich, the former CEO of Intel, announced, "Our cadence today is closer to two and a half years than two."[25] Intel stated in 2015 that improvements in device have slowed, starting at the 22 nm feature width around 2012, and continuing at 14 nm.[26] Krzanich cited Moore's 1975 revision as a precedent for the current deceleration, which results from technical challenges and is "a natural part of the history of Moore's law".[27][28][29] Leading semiconductor manufacturers, TSMC and Samsung Electronics, have the 10 nm and 7 nm nodes in

4 0
2 years ago
Other questions:
  • Jamie is preparing a presentation on his laptop for his college annual event. He inserts audio and video files into the presenta
    11·2 answers
  • Fill in the blank; "As well as their traditional role of computing data, computers are also extensively used for..."
    14·1 answer
  • Distinguish multiple inheritance and selective inheritance in oo concepts.
    14·1 answer
  • The major result of treating 1-butyne with 6M aqueous NaOH would be:_______.A. the production of an alkene.B. the production of
    10·1 answer
  • Create the strAnalysis() function that takes 1 string argument and returns a string message. The message will be an analysis of
    15·1 answer
  • Enter a nested function in cell G8 that displays the word Flag if the Payment Type is Credit and the Amount is greater than or e
    9·1 answer
  • In this assignment, you are provided with working code that does the following: 1. You input a sentence (containing no more than
    14·1 answer
  • Write a function that takes a string like 'one five two' and returns the corresponding integer (in this case, 152). A function j
    11·2 answers
  • Design an application for Bob's E-Z Loans. The application accepts a client's loan amount and monthly payment amount. Output the
    8·1 answer
  • Assign total_owls with the sum of num_owls_A and num_owls_B.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!