Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question-2, 3,4 Submit: three python files and three word files. Word files will capture shell window output when you run the python program Attached is

Question-2, 3,4 Submit: three python files and three word files. Word files will capture shell window output when you run the python program

Attached is a photo

please detailed answers for Q 1 Q2 Q3

image text in transcribed

Q 1

Q2

Q3

1.9 Data Compression - 63 Finally, runtime errors at this level might include unintentionally dividing by zero or using a variable before you have defined it. Python reads statements from top to bottom; it and must see an assignment statement to a variable before that variable is used in an expression. Testing is an integral part of writing Python scripts-or really any kind of program-effectively. Run your script frequently as you write it, perhaps as often as after you complete each line of code. This allows syntax errors to be identified and fixed early and helps focus the author's attention on what should be happen- ing at each step of the script. Questions & Exercises 1. What makes Python an interpreted programming language? 2. Write Python statements that print the following: a. The words "Computer Science Rocks", followed by an exclamation point b. The number 42 C. An approximation of the value of Pi to 4 decimal places 3. Write Python statements to make the following assignments to variables: a. The word "programmer" to a variable called, rockstar b. The number of seconds in an hour to a variable called seconds_per_hour c. The average temperature of the human body to a variable called bodyTemp 4. Write a Python statement that given an existing variable called bodyTemp in degrees Fahrenheit stores the equivalent temperature in degrees Cel- sius to a new variable called metricBodyTemp. 1.9 Data Compression For the purpose of storing or transferring data, it is often helpful (and sometimes mandatory) to reduce the size of the data involved while retaining the underlying information. The technique for accomplishing this is called data compression. We begin this section by considering some generic data compression methods and then look at some approaches designed for specific applications. Generic Data Compression Techniques Data compression schemes fall into two categories. Some are lossless, others are lossy. Lossless schemes are those that do not lose information in the compres- sion process. Lossy schemes are those that may lead to the loss of information. Lossy techniques often provide more compression than lossless ones and are

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

5. List the forces that shape a groups decisions

Answered: 1 week ago

Question

4. Identify how culture affects appropriate leadership behavior

Answered: 1 week ago