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
allsm [11]
3 years ago
6

A structure that specifies which of a number of permitted data types (e.g. integers) that may be stored in its instances is:

Computers and Technology
1 answer:
labwork [276]3 years ago
4 0

A union is a data type that allows you to define that different data types take up the same space (e.g., an int and a float).

Usually this is not a very safe way of programming, but there can be specific reasons to do it.

- edit: I deliberately give the definition of a union here, because the question can be interpreted in multiple ways. So I see how you could interpret the question as the definition of a linked list as well.


You might be interested in
Q1). Write a python program to pass a list to a function and double the odd values and half even values of a list and display li
zepelin [54]

Answer:

\textsf{\large{\underline{Solution}:}}

The given problem is solved using language - Python.

def f(x):

   new_list=[]

   for i in x:

       if i%2==0:

           new_list.append(i//2)

       else:

           new_list.append(i*2)

   return new_list

   

my_list=list(range(1,6))

print('Original List:',my_list)

my_list=f(my_list)

print('Modified List:',my_list)

\textsf{\large{\underline{Logic}:}}

  1. Create a new list.
  2. Iterate over the list passed into the function.
  3. Check if the element is even or not. If true, append half the value of element in the list.
  4. If false, append twice the value of the element in the list.
  5. At last, return the new list.

There is another way of doing this - By using map() function.

—————————————————————————————

def f(x):

   return list(map(lambda x:x//2 if x%2==0 else 2*x,x))

   

my_list=list(range(1,6))

print('Original List:',my_list)

my_list=f(2my_list)

print('Modified List:',my_list)

—————————————————————————————

\textsf{\large{\underline{O{u}tput}:}}

Original List: [1, 2, 3, 4, 5]

Modified List: [2, 1, 6, 2, 10]

8 0
3 years ago
Michelle wants to define the scope of a software development project for the benefit of her company. How does defining the scope
telo118 [61]

Answer:

im pretty sure its A

Explanation:

it makes more sense

4 0
3 years ago
Because filling a pool/pond with water requires much more water than normal usage, your local city charges a special rate of $0.
nevsk [136]

Answer:

In C:

#include <stdio.h>

int main(){

   float length, width, depth,poolvolume,watervolume,charges;

   printf("Length (feet) : ");    scanf("%f",&length);

   printf("Width (feet) : ");    scanf("%f",&width);

   printf("Depth (feet) : ");    scanf("%f",&depth);

   poolvolume = length * width* depth;

   watervolume = length * width* (12 * depth - 3)/12;

   charges = 100 + 0.77 * watervolume;

   printf("Invoice");

   printf("\nVolume of the pool: %.2f",poolvolume);

   printf("\nAmount of the water needed: %.2f",watervolume);

   printf("\nCost: $%.2f",charges);

   printf("\nLength: %.2f",length);

   printf("\nWidth: %.2f",width);

   printf("\nDepth: %.2f",depth);

   printf("\nMr. Royal [Replace with your name] ");

   return 0;}

Explanation:

This declares the pool dimensions, the pool volume, the water volume and the charges as float    

float length, width, depth,poolvolume,watervolume,charges;

This gets input for length

   printf("Length (feet) : ");    scanf("%f",&length);

This gets input for width

   printf("Width (feet) : ");    scanf("%f",&width);

This gets input for depth

   printf("Depth (feet) : ");    scanf("%f",&depth);

This calculates the pool volume

   poolvolume = length * width* depth;

This calculates the amount of water needed

   watervolume = length * width* (12 * depth - 3)/12;

This calculates the charges

   charges = 100 + 0.77 * watervolume;

This prints the heading Invoice

printf("Invoice");

This prints the volume of the pool

   printf("\nVolume of the pool: %.2f",poolvolume);

This prints the amount of water needed

   printf("\nAmount of the water needed: %.2f",watervolume);

This prints the total charges

   printf("\nCost: $%.2f",charges);

This prints the inputted length

   printf("\nLength: %.2f",length);

This prints the inputted width

   printf("\nWidth: %.2f",width);

This prints the inputted depth

   printf("\nDepth: %.2f",depth);

This prints the name of the programmer

   printf("\nMr. Royal [Replace with your name] ");

   return 0;}

<em>See attachment for program in text file</em>

Download txt
3 0
2 years ago
It is a good programming practice to ________ your functions by writing comments that describe what they do.
AleksandrR [38]
It is a good programming practice to explain your functions by writing comments that describe what they do.
7 0
3 years ago
Raul converts numbers in base 10 to base 2. Which answer best defends why Raul would need to do this?
gtnhenbr [62]

Answer:

C

Explanation:

All the calculation by computer is performed in base 2. Base 2 is also named as binary computation and it is used in all the computer and digital data processing processors.

Some differences between base 2 and base 10 are:

  • Base 2 number system contains 0 and 1 whereas base 10 is from 0 to 9.
  • Digital systems works on 0 and 1 logic i.e on and off logic. So we use digital system easily in binary domain whereas, decimal system has 0-9 levels and they are hard to be catered in digital domain.
  • Base 10 is used in normal calculations for daily use and binary is only confined to digital domain.
7 0
3 years ago
Other questions:
  • What kind of firewall can block designated types of traffic based on application data contained within packets?
    7·1 answer
  • as measuring the current, the shunt resistance of a galvanometer is needed to be zero. so why don't we put a wire parallel to th
    9·1 answer
  • I will upvote....
    10·1 answer
  • In your opinion, what is an example of an innovative solution to an engineering problem? Explain briefly why you chose this answ
    9·1 answer
  • Which of the following is not a storage medium?
    14·2 answers
  • Your program has a two-dimensional array, scores. You are implementing your array with lists. Each member in the array is a pair
    7·1 answer
  • What is the best definition of a network?
    14·2 answers
  • If the starting address location changes, in which of the following cases, the program has to be recompiled? Select one: a. Both
    12·1 answer
  • With
    10·2 answers
  • What is bigger that terbites
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!