subject

Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/ 1/10. i wrote as below : > > > x = [1/2.0, 1/3.0, 1/4.0, 1/5.0] > > > y = 0 > > > for i in x: y = y + 1 print x [0.5, 0.3333333333333333, 0.25, 0.2] [0.5, 0.3333333333333333, 0.25, 0.2] [0.5, 0.3333333333333333, 0.25, 0.2] [0.5, 0.3333333333333333, 0.25, 0.2] but output prints for every turn. is it possible to print once ? note: this is in python,

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:50
Representa os dados de um banco de dados como uma coleç? o de tabelas constituídas por um conjunto de atributos, que definem as propriedades ou características relevantes da entidade que representam. marque a alternativa que representa o modelo descrito no enunciado. escolha uma:
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
When making changes to optimize part of a processor, it is often the case that speeding up one type of instruction comes at the cost of slowing down something else. for example, if we put in a complicated fast floating-point unit, that takes space, and something might have to be moved farther away from the middle to accommodate it, adding an extra cycle in delay to reach that unit. the basic amdahl's law equation does not take into account this trade-off. a. if the new fast floating-point unit speeds up floating-point operations by, on average, 2ă—, and floating-point operations take 20% of the original program's execution time, what is the overall speedup (ignoring the penalty to any other instructions)? b. now assume that speeding up the floating-point unit slowed down data cache accesses, resulting in a 1.5ă— slowdown (or 2/3 speedup). data cache accesses consume 10% of the execution time. what is the overall speedup now? c. after implementing the new floating-point operations, what percentage of execution time is spent on floating-point operations? what percentage is spent on data cache accesses?
Answers: 2
question
Computers and Technology, 24.06.2019 05:50
What all vehicles has tesla inc. created over the years
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
You know the right answer?
Using a for loop, write a program that prints out the decimal equivalents of 1/2, 1/3, 1/ 1/10. i w...
Questions
question
Mathematics, 07.09.2020 18:01
question
Mathematics, 07.09.2020 18:01
question
Chemistry, 07.09.2020 18:01
question
History, 07.09.2020 18:01
question
History, 07.09.2020 18:01
question
Biology, 07.09.2020 18:01
Questions on the website: 13722363