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
Vladimir [108]
3 years ago
12

The variable planet_distances is associated with a dictionary that maps planet names to planetary distances from the sun. Write

a statement that deletes the entry for the planet name "Pluto".

Computers and Technology
1 answer:
levacccp [35]3 years ago
6 0

Answer:

Check the attached image

Explanation:

Check the attached image

You might be interested in
Your task is to write a C program that measures the latencies of various system calls. In particular, you want to know 1) the co
tensa zangetsu [6.8K]

Answer and Explanation:

#include <stdio.h>

#include<fcntl.h>

#include <sys/time.h>

#include<time.h>

#define MAX 1000

int main()

{

int pid;

int i,fd ;

char c[12];

FILE *fp;

struct timeval start,end;

double time1,time2,time3;

//open file for writing

fp=fopen("output.txt","w");

 

if(!fp)

{

printf("Not able to open the file output.txt\n");

return -1;

}

for(i = 0; i < MAX ; i++)

{

gettimeofday(&start,NULL);

//invoke getpid call

system(pid = getpid());

//printf("%d\n",start.tv_usec);

}

gettimeofday(&end,NULL);

//printf("%d\n",(end.tv_usec - start.tv_usec));

time1 = ((end.tv_sec - start.tv_sec) + (end.tv_usec - start.tv_usec) / 1000000.0)/MAX;

 

//wtite the time taken to execute getpid to

//to get micro second , divide multiply time by 1000000 , to get nano multiply time by 1000000000

printf("getpid(): %.10f %.10f\n",time1*1000000,time1*1000000000);

fprintf(fp,"getpid():%.10f %.10f\n",time1*1000000,time1*1000000000);

//in similar way execute other two commands ,open and read

 

for(i = 0; i < MAX ; i++)

{

gettimeofday(&start,NULL);

//invoke getpid call

system(open("/dev/null", O_RDONLY ));

//printf("%d\n",start.tv_usec);

}

gettimeofday(&end,NULL);

//printf("%d\n",(end.tv_usec - start.tv_usec));

time2 = ((end.tv_sec - start.tv_sec) + (end.tv_usec - start.tv_usec) / 1000000.0)/MAX;

 

//wtite the time taken to execute getpid to

printf("open(): %.10f %.10f\n",time2*1000000,time2*1000000000);

fprintf(fp,"open():%.10f %.10f\n",time2*1000000,time2*1000000000);

//in similar way execute other two commands ,open and read

fd = open("/dev/dev",O_RDONLY );

//printf("fd = %d\n",fd);

for(i = 0; i < MAX ; i++)

{

gettimeofday(&start,NULL);

//invoke getpid call

system( read(fd,c,10));

//printf("%d\n",start.tv_usec);

}

gettimeofday(&end,NULL);

//printf("%d\n",(end.tv_usec - start.tv_usec));

time3 = ((end.tv_sec - start.tv_sec) + (end.tv_usec - start.tv_usec) / 1000000.0)/MAX;

 

//wtite the time taken to execute getpid to

printf("read(): %.10f %.10f\n",time3*1000000,time3*1000000000);

fprintf(fp,"read(): %.10f %.10f\n",time3*1000000,time3*1000000000);

}

----------------------------------------------------------

//output

//I have written output to standard output also , you can remove that

getpid(): 0.1690000000 169.0000000000    

open(): 0.1890000000 189.0000000000    

read(): 3.1300000000 3130.0000000000

------------------------------------------------------

//Makefile content

prob2.o : prob2.c    

         gcc -c  prob2.c                                                                                                                                      

prob2 : prob2.o                                                                                                                                                

       gcc -o prob2 prob2.o                                                                                                                                    

all   :                                                                                                                                                        

       gcc -o prob2 prob2.c                                                                                                                                    

clean:                                                                                                                                                          

       rm -rf prob2.o  

---------------------------------------

use

$make all

then execute as below

$./prob2

3 0
3 years ago
Select the correct answer.
Triss [41]

Answer:

b or d

Explanation:

3 0
2 years ago
What are the top 10 most dangerous computer viruses ?
Solnce55 [7]

Answer:

  • Mydoom
  • Sobig
  • Klez
  • ILOVEYOU
  • WannaCry
  • Zeus
  • Code Red
  • Slammer
  • CryptoLocker
  • Sasser

Explanation:

8 0
3 years ago
Changes in computer technology have an effect on _____.
dlinn [17]

Answer: Changes in computer technology have an effect on everyone.

6 0
3 years ago
Which of the following technologies can operate in the 125 kHz to 134 kHz range?
Sophie [7]

Technologies that can operate in the 125 kHz to 134 kHz range is the

B. RFID

Explanation:

  • RFID is technology which works on radio frequency and it is used for the auto-identification for the different object.
  • The RFID system mainly consists of two parts. In this RFID system, this RFID reader continuously sends radio waves of a particular frequency
  • RFID is the use of radio waves to read and capture information stored on a tag attached to an object, providing a unique identifier for an object.
  • Active RFID tags have a transmitter and their own power source. Instead, they draw power from the reader, which sends out electromagnetic waves that induce a current in the tag's antenna.
  • Semi-passive tags use a battery to run the chip's circuitry, but communicate by drawing power from the reader.
  • Radio frequency identification (RFID) can operate in three frequency bands: 125 kHz to 134 kHz, 13.56 MHz, or 856 MHz to 960 MHz. Bluetooth is 2.4 GHz; NFC is 13.56 MHz; and LTE is between 600 MHz and 6 GHz.
7 0
3 years ago
Other questions:
  • For film editors, which task comes last in their workflow pattern?
    12·2 answers
  • In an inheritance situation, the new class that you create from an existing class is known as the:
    5·1 answer
  • A(n ____ enables a database administrator to define schema components.
    10·1 answer
  • Computers store temporary Internet files in the Recycle Bin. These files take up space and slow down a computer. Which tool can
    10·1 answer
  • What are lexical errors?<br> and fi(a==b)<br> will it be a lexical error or a syntactical error?
    8·1 answer
  • Which of the following illustrations is depicted in the icon that's used to access Windows Help and Support files?
    13·1 answer
  • PLEASE HELP!!!!!!!!!!! The Excel tool that extends the height of a selected cell so that all the text fits into the cell and is
    10·2 answers
  • By convention only, either the first usable address or the last usable address in a network is assigned to the router (gateway)
    11·1 answer
  • What is the minimum number of bits you would need to represent a number on a 0 to 10 scale
    15·1 answer
  • What if you accidentally delete your browser history
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!