answer.
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
Varvara68 [4.7K]
1 year ago
6

You are attempting to open a file containing a list of integer numbers, each on a separate line, and read them into Python as in

t types. What statement could you use to do this, assuming each line is represented by the line variable in a continuous loop?
Computers and Technology
1 answer:
baherus [9]1 year ago
7 0

Answer:

The answer to this question can be given as:

Statement:

number = int(line.strip())

Explanation:

In the above statement, we declare an integer variable number accept the integer value from the file that name is line. In this line, we use the strip() function. This function returns a duplicate string with both starting and tracking characters removed (based on the string parameter passed). The strip() function removes characters from both sides (left and right) based on the parameter(a string defining the collection of characters to be removed).

You might be interested in
The term drive app is used to describe applications stored on a computer true or false
Volgvan
Hello <span>Areyano7475
</span>

Question: T<span>he term drive app is used to describe applications stored on a computer true or false


Answer: False


Hope this helps
-Chris</span>
7 0
1 year ago
Read 2 more answers
When preparing a spreadsheet that contains population data for different nations, what is the best way to provide a visual compa
finlep [7]
The best answer to the question above would be option C: <span>create a bar graph that shows population totals for each nation. Since it emphasizes a visual comparison, the best way to do this is to create a bar graph. So in a bar graph, the numerical values of the variables are also presented such as the population total of each nation. In addition, the rectangular bars can easily show you the difference between each nation which makes this an ideal visual tool for comparison.</span>
7 0
1 year ago
Read 2 more answers
A good way to avoid skids is to _____ when coming into a turn. A. accelerate B. decelerate C. counter steer D. cover brake
lord [1]

Answer:

B decelerate

Explanation:

Deceleration will help in avoiding you from loosing control of the vehicle

3 0
1 year ago
Read 2 more answers
Does the submission include the file "SuperPower.java"? Does the file include a public class called "SuperPower"? Does the class
Oduvanchick [21]

Answer:    

Here is the program fulfilling all the requirements given:

import javax.swing.JOptionPane;      

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog(null, power);} }

Explanation:

Does the file include a public class called "SuperPower"

See the statement:

public class SuperPower

Does the class include a public method called "main"? Is the "main" method static?

See the statement:

public static void main(String[] args)

Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"

See the statement:

power = JOptionPane.showInputDialog("What is your super power?");

Does the main method have a statement that uses "JOptionPane.showMessageDialog"?

See the statement:

JOptionPane.showMessageDialog(null, power);

Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method?

See the statement:

power = power.toUpperCase();

Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?

See the attached screenshots

If the program does not let you enter an exclamation mark after "to the rescue" then you can alter the code as follows:

import javax.swing.JOptionPane;

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog( null, power+"!");} } // here just add an exclamation mark which will add ! after the string stored in  power

5 0
1 year ago
Spark is electrical discharge in air, while air is mix of variety of gases what particles conduct electricity in gas
erastova [34]

Answer:

Mercury, rontgen rays, etc.

Explanation:

There are lots of answers to this question, hope these two help.

6 0
1 year ago
Other questions:
  • Which of the following is ideal for long distance communication ?
    5·1 answer
  • Which of the following is not a benefit of active listening?
    8·1 answer
  • bill and melinda have two young children ages 2 and 4 and they are not covered under any life insurance policy. Melinda is full
    8·1 answer
  • How efficient would a 6-bit code be in asynchronous transmission if it had 1 parity bit, 1 start bit, and 2 stop bits?
    5·1 answer
  • When an author produce an index for his or her book, the first step in this process is to decide which words should go into the
    8·1 answer
  • SHOW ALL YOUR WORK. REMEMBER THAT PROGRAM SEGMENTS ARE TO BE WRITTEN IN JAVA. Assume that the classes listed in the Java Quick R
    9·1 answer
  • Return 1 if ptr points to an element within the specified intArray, 0 otherwise.
    7·1 answer
  • Exercise 4: Bring in program grades.cpp and grades.txt from the Lab 10 folder. Fill in the code in bold so that the data is prop
    12·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • Identify the tips to create a well-designed digital portfolio.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!