please fix this code and put as many comments as possible. i attached the desired output as
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
#code to calulate flop units (kilo,mega etc) transistors int(input("Starting number of transistors: ")) flops = transistors 50 flops_unit - flops unit_count = 0 unit "flops" while flops unit > 1000: flops_unit flops unit/1000 unit_count unit_count +1 if unit_count == 1: unit "KiloFLOPS" elif unit_count == 2: unit "megaFlops" elif unit_count == 3: unit "gigaFlops" elif unit_count == 4: unit "teraFlops" elif unit_count == 5: unit "petaFlops" elif unit_count == 6: unit "exaFlops" elif unit_count == 7: unit "zettaFlops" elif unit_count == 8: unit "yottaFlops" elif unit_count == 0: unit "Flops" rounded_flops =round(flops_unit,2) #Initialize variables year = input("Starting Year: ") num years input("Total number of Years: ") print() print("YEAR : TRANSISTORS: FLOPS : ") Convert input to integers transistors = int (transistors) year =int(year) num years int(num_years) year_range= num years/2 + 1 year range int (year_range) #code to calulate flop units (kilo,mega etc) transistors int(input("Starting number of transistors: ")) flops = transistors 50 flops_unit - flops unit_count = 0 unit "flops" while flops unit > 1000: flops_unit flops unit/1000 unit_count unit_count +1 if unit_count == 1: unit "KiloFLOPS" elif unit_count == 2: unit "megaFlops" elif unit_count == 3: unit "gigaFlops" elif unit_count == 4: unit "teraFlops" elif unit_count == 5: unit "petaFlops" elif unit_count == 6: unit "exaFlops" elif unit_count == 7: unit "zettaFlops" elif unit_count == 8: unit "yottaFlops" elif unit_count == 0: unit "Flops" rounded_flops =round(flops_unit,2) #Initialize variables year = input("Starting Year: ") num years input("Total number of Years: ") print() print("YEAR : TRANSISTORS: FLOPS : ") Convert input to integers transistors = int (transistors) year =int(year) num years int(num_years) year_range= num years/2 + 1 year range int (year_range)
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
Find the values of the parameter p > 0 for which the following series converge. 00 1 k=2 (Ink)P
-
Pflug Ltd. signed an instalment note on January 1, 2017 in settlement of an account payable of $40,000 owed to Mott Ltd. Pflug is able to borrow funds from its bank at 11%, whereas Mott can borrow at...
-
What is the payback period for the following set of BASIC cash-flows? Year Cash Flow 0.................... -$7,600 1...................... 1,900 2...................... 2,900 3.........................
-
What factors determine IS value?
-
You have identified relevant controls for several assertions within the revenue cycle, and you must use IDEA to perform several tests of controls. Required: a. ELM has a policy of using pre numbered...
-
A horizontal force of 5 newton is applied to a 2 kg block initially at rest on a rock horizontal surface. what is it\'s acceleration if the coefficient of friction is 0 . 2
-
Consider the Markov chain in Figure 11.32. There are two recurrent classes, R 1 = {1, 2}, and R 2 = {5, 6, 7}. Assuming X 0 = 4, find the probability that the chain gets absorbed to R 1 . 1 S AL 1 1...
-
During 2021, Anthony (a calendar-year taxpayer) acquired the following business assets: January 15 August 20 September 21 December 20 O half-year convention. O mid-quarter convention. Equipment...
-
A property manager is preparing a monthly report pursuant to the terms of a property management agreement. This report details actual income received from rent and other fees, along with actual...
-
reply to this: hoose a king from the Divided Kingdom era that the Kings and Chronicles account both mention and write a thread. Provide a brief synopsis of the king's rule, then analyze how the...
-
What is a discount? How do you activate discounts? Activate discounts: Assign a discount account: 3. Discounts Given - What is the account type and detail type for this account?
-
What is driving the increase in the price of healthcare services today? Explain why it is important to know the scope of business being reviewed when using financial statements. Explain the content...
-
Blair, CPA, uses the cash receipts and disbursements method of reporting. In Year 7, a client gave Blair 100 shares of a listed corporation's stock in full satisfaction of a $5,000 accounting fee the...
-
The same walk-in clinic took data measurements of its processing times on weekends only. Maximum times, with an upper limit of 30 minutes, stayed the same. However, the overall target time, 16...
-
What are technical skills At what level are they most important and why?
-
Marty is a sales consultant. Marty incurs the following expenses related to entertainment of his clients in 2012: Dues to a country club......................................................$4,500...
-
How much of each of the following prizes or awards is taxable? a. Cheline received a $50,000 gift bag at the Oscars in 2012. b. Jon received a gold watch worth $350 for 25 years of service to his...
-
Jason and Mary are married taxpayers in 2012. They are both under age 65 and in good health. For this tax year, they have a total of $41,000 in wages and $500 in interest income. Jason and Mary's...
-
What is the difference between old classical and new classical economics?
-
What is the difference between traditional Keynesian and new Keynesian economics?
-
Why does monetary policy operate with a long and variable lag? Give an example to illustrate your explanation.
Study smarter with the SolutionInn App