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
s344n2d4d5 [400]
2 years ago
5

Computer programming

Computers and Technology
1 answer:
Svet_ta [14]2 years ago
5 0
Sjanqknjwolq esjkalqlkd
You might be interested in
Write a Python program that uses function(s) for writing to and reading from a file:
swat32

import random

def random_number_file_writer(nums):

   f = open("random.txt", "w")

   i = 0

   while i < nums:

       f.write(str(random.randint(1,500))+"\n")

       i += 1

   f.close()

def random_number_file_reader():

   f = open("random.txt", "r")

   total = 0

   count = 0

   for x in f.readlines():

       total += int(x)

       count += 1

   print("The total of the numbers is "+str(total))

   print("The number of random numbers read from the file is "+str(count))

def main():

   random_number_file_writer(int(input("How many random numbers do you want to generate? ")))

   random_number_file_reader()

main()

I hope this helps!

6 0
3 years ago
INTRODUCTION TO JAVA​
amid [387]

Answer:

INTRODUCTION TO JAVA​

Explanation:

Java is one of the most popular programming languages out there. Released in 1995 and still widely used today, Java has many applications, including software development, mobile applications, and large systems development. Knowing Java opens a lot of possibilities for you as a developer.

5 0
3 years ago
____ twisted pair is the least quality twisted pair wire that should be used in a data/voice application.
xxMikexx [17]

Answer:

Category 5 (Cat 5) twisted pair is the least quality twisted pair wire that should be used.

Explanation:

The reason is as follows:

  1. Category 1 twisted pair is not suitable for transmitting data but comes in handy for telephone communications. Hence, it should not be used in a data/voice application.
  2. Category 2 twisted pair is suitable for data transmission, however, it can only transmit at 4Mbps which is very slow. Hence, it should not be used in a data/voice application.
  3. Category 3 twisted pair can transmit data with speed reaching 10Mbps which is slow for voice/data communication.
  4. Category 4 twisted pair can transmit data with speed reaching 16Mbps and is used in token ring networks. It is slow for communicating in a voice/data application.
  5. Category 5 twisted pair is the least qualified to be used in a voice/data application because it can transmit data at speeds that reach 100Mbps.

Hence, Cat 5 or Category 5 twisted pair is the least quality twisted pair that should be used in a data/voice application.

6 0
3 years ago
Write a C++ console program to do the following: 1. Define an array of ints with the ten elements { 0, 1,2,3, 4, 5, 6, 7, 8, 9 }
Gemiola [76]

Answer:

#include<iostream>

#include <vector>

#include <list>

using namespace std;

int main(){

int a[10]={0,1,2,3, 4, 5, 6, 7, 8, 9 };

std::vector<int> v (&a[0],&a[0]+10);

std::list<int> l (&a[0],&a[0]+10);

int b[10];

for(int i=0;i<10;i++){

b[i]=a[i];

}

std::vector<int> v2(v);

std::list<int> l2(l);

for(int i=0;i<10;i++){

b[i]+=2;

}

for(int i=0;i<10;i++){

v2[i]+=3;

}

for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)

*it=*it+5;

cout<<"Each containers value are: "<<endl;

cout<<"1st array: "<<endl;

for(int i=0;i<10;i++){

cout<<a[i]<<" ";

}

cout<<"\n 1st vector: \n";

for(int i=0;i<10;i++){

cout<<v[i]<<" ";

}

cout<<"\n 1st List is:\n";

for (std::list<int>::iterator it = l.begin(); it != l.end(); it++)

cout << *it << ' ';

cout<<"\n 2nd array: "<<endl;

for(int i=0;i<10;i++){

cout<<b[i]<<" ";

}

cout<<"\n 2nd vector:\n";

for(int i=0;i<10;i++){

cout<<v2[i]<<" ";

}

cout<<"\n 2nd list:\n";

for (std::list<int>::iterator it = l2.begin(); it != l2.end(); it++)

cout << *it << ' ';  

return 0;

}

Explanation:

  • Initialize an array, a vector and a list of type integer .
  • Create a 2nd array, vector, and list as a copy of the first array, vector, and list.
  • Increase the value of each element in the array by 2 , vector by 3 and list by 5.
  • Finally display the relevant results.
7 0
2 years ago
What is the ratio between total bits required for such a cache implementation over the data storage bits?
Luda [366]
<span>Answer: [ 128 * (32*8 + 20 + 1) ] / [ 128 * (32*8) ] = 277/256</span>
6 0
3 years ago
Other questions:
  • In procedural programming, where does the flow of control usually route from the main function?
    8·1 answer
  • PLEASE TELL ME WHAT THIS MEANS<br><br> dir="rtl"&gt;יזבל
    14·1 answer
  • Exampels of semantic tags ?​
    7·1 answer
  • Why is it important to be part of a team in times you fail and in times you succeed?​
    15·1 answer
  • Keep true , never be ashamed of doing right decide on what you think is right and stick to it.
    14·1 answer
  • Microsoft's ____ is one of the major web-based development environments.
    12·1 answer
  • In this lesson you wrote code to make the turtle draw squares. Briefly describe how the code for
    11·1 answer
  • HELP PLX ITS PYTHON BTW!!!
    8·1 answer
  • In QBasic, create a number guessing challenge. Your program should generate a random number from 1-
    9·1 answer
  • Microsoft recommends when that you create passwords with upper and lowercase letters, numbers, symbols, and use at least _______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!