Create a data file in the specified format

Assignment Help Basic Computer Science
Reference no: EM13308473

A file floatnums.dat has been created for use in an experiment. However, it contains float(real) numbers and what is desired instead is integers. Also, the file is not exactly in the correct format; the values are stored columnwise rather than rowwise. For example, if the file contains the following:

 

90.5792      27.8498     97.0593

12.6987      54.6882     95.7167

91.3376      95.7507     48.5376

63.2359      96.4889     80.0280

9.7540         15.7613     14.1886

 

what is really desired is:

 

91      13      91     63      10

28      55       96    96       16

97      96       49    80       14

 

Create a data file in the specified format. Write a script that would read from the file floatnums.dat into a matrix, round the numbers, and write the matrix in the desired format to a new file called "intnums.dat."

 

Reference no: EM13308473

Questions Cloud

At what speed is the moon traveling : The moon is 3.85Ã-10^8 m from Earth, and it takes 27.3 days to orbit Earth. At what speed is the moon traveling relative to Earth
Choose three macroeconomic variables to include in discussio : Suppose the U.S. economy is in a recession which came from a negative AD shock.  To provide consumers with an incentive to spend more of their disposable incomes, Congress and the President pass a law making it illegal for an individual to hold more ..
What pressure in psi is applied to water to reduce volume : At normal atmospheric conditions, approximately what pressure in psi must be applied to water 70 F to reduce its volume by 2 %
Determine the maximum possible value for the first player : Then two players take turns picking a coin from the sequence, but can only pick the first or the last coin of the (remaining) sequence. The goal is to collect coins of the largest total value. For this problem, n is even.
Create a data file in the specified format : Create a data file in the specified format. Write a script that would read from the file floatnums.dat into a matrix, round the numbers, and write the matrix in the desired format to a new file called "intnums.dat."
Determine is there any runoff from the area during the storm : During a 5 hour storm event, the precipitation over a 230-acre area is 1.5niches. There is constant infiltration at a rate of 0.12 inches/hour and the depession storage is 17 acre-ft. Is there any runoff from the area during the storm
How much volume of naoh solution is needed at poh at 9 : A NaOH solution has pOH at 8. How much volume of this NaOH solution is needed to prepare 1 L of a NaOH solution at pOH at 9.
Elaborate and apply to current events : Elaborate and apply to current events. Be sure to cite and demonstrate mastery.
What good outcomes as well as bad outcomes will result : Suppose the U.S. economy is in a recession and there is rising inflation.  Suppose you are in charge of monetary, fiscal, and exchange rate (i.e., influencing the value of the dollar) policies.

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd