# BIL 101 INTRODUCTION TO COMPUTER SCIENCE HW 02 solved

\$35.00

## Description

5/5 - (1 vote)

PART 1 (Submit to moodle / .py file)
Write a python code that:
1. Assigns two numbers to two variables.
2. Prints their values.
3. Switches their values. (Use a temporal variable.)
4. Prints their values.
Explain what happens in each line of code writing comments.
PART 2 (Submit to moodle / .doc file)
Research IEEE 32 and 64 bits floating point format. Answer the following questions
according to IEEE 32 bits floating point format. Write detailed explanations of
1. Convert decimal 0.0098 to binary representation.
2. Convert binary 11000001011100000000000000000000 to decimal.
PART 3 (Submit to moodle / .doc file)
Remember that an algorithm is a set of steps that defines how a task is performed.
Your task is sorting numbers. Write an algorithm that sorts an unsorted sequence of
numbers ascending. The algorithm creates a new sorted sequence. The new place of
an element X in the sorted sequence is decided by counting the number of elements
come before element X in the sorted sequence. For instance, if our unsorted
sequence is (9 1 2 8 3 5), the place of 5 in the sorted sequence should be 4. Write