1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
guapka [62]
2 years ago
10

4.9 Code Practice: Question 4

Computers and Technology
1 answer:
hichkok12 [17]2 years ago
7 0

total = 0

i = 0

while i < 10:

   temp = float(input("Enter Temperature: "))

   total += temp

   i += 1

print("Sum =", str(total))

I hope this helps!

You might be interested in
When you see a blank pointer this means you can drag the row or column border to change height or width
Orlov [11]
No, you would see arrows pointing in opposite directions <--> like so
7 0
3 years ago
Assume that a large number of consecutive IP addresses are available starting at 198.16.0.0 and suppose that two organizations,
Fiesta28 [93]

Answer & Explanation:

An IP version 4 address is of the form w.x.y.z/s

where s = subnet mask

w = first 8 bit field, x = 2nd 8 bit field, y = 3rd 8 bit field, and z = 4th 8 bit field

each field has 256 decimal equivalent. that is

binary                                        denary or decimal

11111111      =        2⁸      =             256

w.x.y.z represents

in binary

11111111.11111111.11111111.11111111

in denary

255.255.255.255

note that 255 = 2⁸ - 1 = no of valid hosts/addresses

there are classes of addresses, that is

class A = w.0.0.0 example 10.0.0.0

class B = w.x.0.0 example 172.16.0.0

class C = w.x.y.0 example 198.16.8.1

where w, x, y, z could take numbers from 1 to 255

Now in the question

we were given the ip address : 198.16.0.0 (class B)

address of quantity 4000, 2000, 8000 is possible with a subnet mask of type

255.255.0.0 (denary) or

11111111.11111111.00000000.00000000(binary) where /s =  /16 That is no of 1s

In a VLSM (Variable Length Subnet Mask)

Step 1

we convert the number of host/addresses for company A to binary

4000 = 111110100000 = 12 bit

step 2 (subnet mask)

vary the fixed subnet mask to reserve zeros (0s) for the 12 bit above

fixed subnet mask: 11111111.11111111.00000000.00000000            /16

variable subnet mask: 11111111.11111111.11110000.000000                /20

now we have added 4 1s in the 3rd field to reserve 12 0s

<u><em>subnet mask: 255.255.</em></u><u><em>16.</em></u><u><em>0 (where the 1s in each field represent a denary number as follows)</em></u>

<u><em>1st 1 = 128, 2nd 1 = 64 as follows</em></u>

<u><em>1        1       1      </em></u><u><em> 1 </em></u><u><em>      1     1     1     1</em></u>

<u><em>128  64     32    </em></u><u><em>16</em></u><u><em>    8    4     2    1</em></u>

step 3

in the ip network address: 198.16.0.0/19 <em>(subnet representation)</em> we increment this using 16

that is 16 is added to the 3rd field as follows

That means the ist Valid Ip address starts from

          Ist valid Ip add: 198.16.0.1 - 198.16.15.255(last valid IP address)

Company B starts<u><em>+16: 198.16.</em></u><u><em>16</em></u><u><em>.0 - 198.16.31.255</em></u>

<u><em>                   +16: 198.16.</em></u><u><em>32</em></u><u><em>.0- 198.16.47.255 et</em></u>c

we repeat the steps for other companies as follows

Company B

Step 1

we convert the number of host/addresses for company B to binary

2000 = 11111010000 = 11 bit

Step 2

vary the fixed subnet mask to reserve zeros (0s) for the 11 bit above

fixed subnet mask: 11111111.11111111.00000000.00000000            /16

variable subnet mask: 11111111.11111111.11111000.000000                /21

now we have added 5 1s in the third field to reserve 11 0s

<u><em>subnet mask: 255.255.</em></u><u><em>8.</em></u><u><em>0 (where the 1s in each field represent a denary number as follows)</em></u>

<u><em>1st 1 = 128, 2nd 1 = 64 as follows</em></u>

<u><em>1        1       1       1       </em></u><u><em>1 </em></u><u><em>    1     1     1</em></u>

<u><em>128  64     32    16    </em></u><u><em>8 </em></u><u><em>   4     2    1</em></u>

Step 3

Starting from after the last valid Ip address for company A

in the ip network address: 198.16.16.0/21 (<em>subnet representation</em>) we increment this using 8

That means the ist Valid Ip address starts from

           Ist valid Ip add: 198.16.16.1 - 198.16.23.255(last valid IP address)

Company C starts <u><em>+16: 198.16.</em></u><u><em>24</em></u><u><em>.0- 198.16.31.255</em></u>

<em>                             </em><u><em> +16: 198.16.</em></u><u><em>32</em></u><u><em>.0- 198.16.112.255 et</em></u>c

Company C

Step 1

we convert the number of host/addresses for company C to binary

4000 = 111110100000 = 12 bit

Step 2

vary the fixed subnet mask to reserve zeros (0s) for the 12 bit above

fixed subnet mask: 11111111.11111111.00000000.00000000            /16

variable subnet mask: 11111111.11111111.11110000.000000                /20

now we have added 4 1s in the 3rd field to reserve 12 0s

<u><em>subnet mask: 255.255.</em></u><u><em>16.</em></u><u><em>0 (where the 1s in each field represent a denary number as follows)</em></u>

<u><em>1st 1 = 128, 2nd 1 = 64 as follows</em></u>

<u><em>1        1       1       1       1     1     1     1</em></u>

<u><em>128  64     32    16    8    4     2    1</em></u>

Step 3

Starting from after the last valid ip address for company B

in the ip network address: 198.16.24.0/20 (subnet representation) we increment this using 16

That means the ist Valid Ip address starts from

           Ist valid Ip add: 198.16.24.1 - 198.16.39.255(last valid IP address)

Company C starts <u><em>+16: 198.16.40.0- 198.16.55.255</em></u>

<em>                          </em><u><em>    +16: 198.16.56.0- 198.16.71.255 et</em></u>c

Company D

Step 1

we convert the number of host/addresses for company D to binary

8000 = 1111101000000 = 13 bit

Step 2

vary the fixed subnet mask to reserve zeros (0s) for the 13 bit above

fixed subnet mask: 11111111.11111111.00000000.00000000            /16

variable subnet mask: 11111111.11111111.11100000.000000                /19

now we have added 3 1s in the 3rd field to reserve 13 0s

<u><em>subnet mask: 255.255.</em></u><u><em>32.</em></u><u><em>0 (where the 1s in each field represent a denary number as follows)</em></u>

<u><em>1st 1 = 128, 2nd 1 = 64 as follows</em></u>

<u><em>1        1      </em></u><u><em> 1 </em></u><u><em>      1       1     1     1     1</em></u>

<u><em>128  64     </em></u><u><em>32  </em></u><u><em>  16    8    4     2    1</em></u>

Step 3

Starting from after the last valid ip address for company C

in the ip network address: 198.16.40.0/20 (subnet representation) we increment this using 32

That means the ist Valid Ip address starts from

           Ist valid Ip add: 198.16.40.1 - 198.16.71.255(last valid IP address)

Company C starts <u><em>+16: 198.16.72.0- 198.16.103.255</em></u>

<em>                          </em><u><em>    +16: 198.16.104.0- 198.16.136.255 et</em></u>c

5 0
3 years ago
Q1: Which of the following is an input peripheral device?
faltersainse [42]

Answer:

Mouse

Explanation:

Input devices allow users to input something in the computer. For example keyboard allows users to type on the computer, or mouse allows users to click.

On the other hand output devices allow computers to output data. For example speakers allow us to hear the outputs of a computer.

3 0
3 years ago
Read 2 more answers
The term eof represents
rewona [7]

Answer:

EOF stands for End Of File

Google explains it well: EOF is a condition in a computer operating system where no more data can be read from a data source. The data source is usually called a file or stream.

8 0
2 years ago
Read 2 more answers
You need to secure your wireless network. which security protocol would be the best choice
natka813 [3]
Changing the password. whenever you change the password of your router, it disconnects all current devices, including ones you don't want to be connected. from there, reconnect the devices you want on the network and then you are done!
7 0
3 years ago
Other questions:
  • Saas provides services to an organization that requires the standard business process infrastructure such a CRM
    7·1 answer
  • The word Only is absolute or qualified
    8·2 answers
  • Tomahawk Industries develops weapons control systems for the military. The company designed a system that requires two different
    13·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • Name any two procedure oriented programming language​
    15·1 answer
  • HURRRY WILLL GIVE BRAINLIST!!!!!!
    12·1 answer
  • True or False, In adversarial searching, agents using the MiniMax algorithm always select the state that has the highest guarant
    15·1 answer
  • Select the correct answer.
    7·1 answer
  • Complete the sentence.
    12·2 answers
  • A(n) ____ is a web-based repository of information that anyone can access, contribute to, or modify.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!