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
timofeeve [1]
3 years ago
11

Assignment 4 evens and odds

Computers and Technology
1 answer:
Viefleur [7K]3 years ago
4 0

I've added my own code in a picture below. I didnt really notice any error, which would cause problems in your code. The main issues I had with your code is purely readability. You should start using the format function along with the curly brackets to concatenate variables into strings. You should also start doing even += 1 instead of even = even + 1. I also tweaked your range function. Simply putting n makes it much easier to read and understand.

You might be interested in
The ________ is the easy way to insert a new slide between existing slides.
Tema [17]
What is the subject about?
7 0
3 years ago
Read the integer numbers in the text file "1000 Random Number from 0 to 100.txt" into a list
Marianna [84]

Answer:

random_number_file = open("1000 Random Number from 0 to 100.txt", 'r')

random_number_list = random_number_file.readlines()

print('random_number_list)

Explanation:

The name of the file containing the random integer text is ; "1000 Random Number from 0 to 100.txt"

The random_number_file variable stores the opened file ("1000 Random Number from 0 to 100.txt") using the open keyword and reads it ('r')

This file stored in the random_number_file variable is the read into a list by using the readlines() method on the random_number_file

6 0
3 years ago
If you do not want the border style to carry forward each time the enter key is pressed, you need to ____.
ANEK [815]
Hello <span>Endermss2118 </span>

Answer: If you do not want the border style to carry forward each time the enter key is pressed, you need to Clear formatting


Hope This Helps
-Chris
8 0
3 years ago
Which of these is NOT a benefit of trade?
Natasha_Volkova [10]

Answer:

<em>Creation of Dependencies</em> is not the only benefit of trade in the list.

Explanation:

People can provide the access to their resource with the help of trading, it will also increase the satisfaction of customer as he will be able to buy the product of his own choice with satisfactory price, as it breaks the monopoly of local producers.

There many disadvantages of the trade, such as it will create dependencies on other countries and local producers not be able to produce that products, this will lead to increase in imports and will increase the trade deficit of the country.

8 0
4 years ago
What is the capacity of a disk with two platters, 10,000 cylinders, an average of 400 sectors per track, and 512 bytes per secto
natita [175]

Answer:

The capacity of the disk is "40 GB".

Explanation:

Given value:

\to \text{cylinder}= 10,000\\\\\to \frac{sector}{track} = 400\\\\\to \frac{bytes}{sector} = 512\\

\text{Calculating the size of track} =  \frac{bytes}{sector} \times  \frac{sector}{track}

                                            = 512 \times  400 \\\\ = 204,800 \ \ Or  \ \ 200 \ K

\text{Calculating the size of surface} = \frac{byte}{track} \times \ cylinder

                                               = 2000 \ K \times  10,000 \\\\ = 20, 000,000 \ K

\text{Calculating the capacity of a disk} = \frac{byte}{surface} \times \frac{surface}{disk}

                                                     = 20, 000,000 \ K \times  2 \\\\ = 40, 000,000 \ K \\\\= 40 \ GB

Cache memory is often used to speed up the runtime. It will enable us to improve performance unless we can store information, that is retrieved constantly in memory space.

  • Hit Cache: when the Processor relates to representing database data, Cache Hit results.
  • Miss Cache: when this Processor responds to a non-present cache data, this will trigger its miss of cache.
  • It doesn't have to retrieve the Main Memory through secondary storage.
3 0
3 years ago
Other questions:
  • TCP waits until it has received three duplicate ACKs before performing a fast retransmit. Why do you think the TCP designers cho
    13·1 answer
  • Enter a nested lookup function in cell E4 that uses the cells E2 and E3 to return a specific sales record. For example, using th
    14·1 answer
  • A blank is a link on a web page that leads to another web page.
    14·1 answer
  • Sending a busy manager a long email represents a problem in which area of the communication process
    7·1 answer
  • Write a VB.Net program to print numbers from 10 to 20 in descending order using a For Statement.
    14·1 answer
  • CHEMISTRY. metal+water》base+...............​
    12·1 answer
  • What layer in the Transmission Control Protocol/Internet Protocol (TCP/IP) model is responsible for defining a way to interpret
    11·1 answer
  • Given the following table of students, assignments, and grades for a single class:
    6·1 answer
  • ANSWER QUICKLY!!!
    5·1 answer
  • 1. The opportunity to create several equations for launching program files is called
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!