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
marysya [2.9K]
3 years ago
7

Know when the double, int, String, and char data types are best used. Example: I would store a social security number in a strin

g because the social can contain dashes and it is only used for displaying not for a mathematical equation.
Computers and Technology
1 answer:
lidiya [134]3 years ago
4 0
A double is best used for numbers that are real, as in they have a decimal. Int is best used for numbers that are whole, as in no decimal. Strings are best used, as in the example you gave, when you have to represent a piece of information that isn’t strictly numbers
You might be interested in
Which peripheral device is used to record sound?
faust18 [17]

he will need a microphone, it is a recording device.

8 0
3 years ago
Read 2 more answers
Can a 3048 hp motherboard support a i7 10700k cpu?
KonstantinChe [14]

Answer:

Yes

Explanation:

6 0
3 years ago
Read 2 more answers
In this exercise, your function will receive 2 parameters, the name of a text file, and a list of strings. The function will wri
diamong [38]

Answer:

# the function is defined

# it takes 2 arguments: filename and list of string

def solution(filename, listOfString):

   # the file is opened in write mode

   # so that we can write to it

   with open(filename, 'w') as file_object:

       # we loop through the entire list of string

       # this looping help us know what to write to the file

       for each_string in listOfString:

           # if the length of the string is less than 4

           # we write 'x' with a new line

           if len(each_string) < 4:

               file_object.write("x\n")

           # else if the length of the string is greater than equals 4

           # we write the fourth character

           # and also add new line

           else:

               file_object.write(each_string[3])

               file_object.write("\n")

Explanation:

The function is written in Python. It takes two argument; filename and list of string.

It opens the file in write mode and then loop through the list of string. During the loop, we know what to write to the file.

In the length of a string is less than 4; we write 'x' else we write the fourth character in the string. The fourth character has an index of 3 because string uses zero index counting like a string. Starting from zero; 0, 1, 2, 3, 4... the fourth character has an index of 3.

5 0
3 years ago
Time shifting occurs when
Aleksandr-060686 [28]
Answer: C

Time shifting is when you move from one period in time to another.
4 0
3 years ago
Read 2 more answers
Which step creates a connection between a file and a program in python?
Mandarinka [93]
<span>The step of opening a file creates a connection between a file and a program.Opening an output file usually creates the file on the disk and allows the program to write data to it.Opening an input file allows the program to read data from the file.</span>
5 0
3 years ago
Other questions:
  • Cryptolocker is an example of what type of malware?
    11·1 answer
  • To use the program service routines, the user's program makes requests to the operating system through the
    10·1 answer
  • What is a parameter variable?
    8·1 answer
  • Which of the following controls will provide an area in the form for the user to enter a name? a. button b. label c. text box d.
    8·1 answer
  • How do i move a file in python3
    10·1 answer
  • The best way to ensure the accuracy and safety of your accounts is to:
    10·1 answer
  • What is the difference between the flip horizontal and the flip vertical option
    8·1 answer
  • Mention the usage of crop concept in ms-word​
    13·2 answers
  • The most serious security threat to Bluetooth-enabled devices is ____, which occurs when a hacker gains access to the device and
    10·1 answer
  • What is an example of work performed by an integration platform as a service (ipaas)?
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!