Question: please fix this code and put as many comments as possible. i attached the desired output as the last photo. #code to calulate flop units
please fix this code and put as many comments as possible. i attached the desired output as the last photo.


#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)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
