Computers and Technology

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,

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 19:30, tfaulk2884
Singing in the rain: this first part of the film shows the early history of motion picture. how accurate do you think the portrayal of the early motion picture industry is? why? is historical accuracy important in films and theater productions? explain.
Answers: 1
image
Computers and Technology, 22.06.2019 21:30, Cheflulu5727
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarl y if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
image
Computers and Technology, 23.06.2019 03:10, kyleereeves2007
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e. g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
image
Computers and Technology, 23.06.2019 18:00, MagicDragon4734
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
Do you know the correct 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 in other subjects:

Konu
English, 21.01.2021 14:00