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
Luden [163]
3 years ago
7

The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * sym

bol represents multiplication. Fix the errors so that the code works correctly: input ("Enter a number: ") print (num * 8)
Computers and Technology
1 answer:
liq [111]3 years ago
5 0

Answer:

The correct program is as follows:

num = float(input ("Enter a number: "))

print(num * 8)

Explanation:

Notice the difference between (1)

num = float(input ("Enter a number: "))

print (num * 8)

and (2)

input ("Enter a number: ")

print(num * 8)

Program 1 is correct because:

- On line 1, it takes user input in numeric form, unlike (2) which takes it input as string

- On line 2, the program multiplies the user input by 8 and prints it out

You might be interested in
Which of the following identifies your location in a document? I-beam Icon Insertion Point Pointing Arrow
Delicious77 [7]
The answer is Insertion Point. In Microsoft Word, the insertion point is the blinking vertical line in the document. It will identify the location where you can enter or alter text on the page. When creating a new document, the insertion point is located in the top-left corner of the document. 
8 0
3 years ago
PLEASE HELPPP FAST!! :(
Pavlova-9 [17]

The option that is the  overall purpose of a software application is option c: Answers depend on problem needing to be solved.

<h3>What is application software?</h3>

An application is a term that is often known to be application program or form of an application software.

This is seen as is a computer software package that carry out a specific function which can be done  directly for an end user or, in some ways made for another application. An application is one that may be self-contained or a set  of programs.

Therefore, based on the above, The option that is the  overall purpose of a software application is option c: Answers depend on problem needing to be solved.

Learn more about software application from

brainly.com/question/24264599
#SPJ1

4 0
1 year ago
Anyone can publish information on the internet without fact checking it. T or F
choli [55]
True. this is a danger in the internet.stay safe
5 0
3 years ago
Modify the program you wrote for Chapter 6 Exercise 6 so it handles the following
Basile [38]

Answer:

#try except

try:

   #opening the file

   read_file = open('numbers.txt', 'r')

   #Store the numbers in the variable file_numbers.

   file_numbers = read_file.read()

   #close the file

   read_file.close()

   #Split the number of files in list_values.

   list_values = file_numbers.split()

   #how many numbers are there

   list_length = len(list_values)

   try:

       #loop it up

       for i in range(list_length):

           list_values[i] = float(list_values[i])

       #Add up all the numbers, put into list_sum

       List_sum = sum(list_values)

       #heres how we average it

       Average_value = (List_sum)/list_length

       #print

       print(Average_value)

   except ValueError:

       print( "File must have only numbers. Try again." )

   #handles IOError exceptions

except IOError:

   #Display statement

   print("Trouble opening file. Try again.")

Explanation:

The python program uses the try-except exception handling method to catch errors in the code. The IOError is used for catching input and output errors in the program like file handling while the ValueError keyword in the except statement is used to catch data type errors from a return statement, calculation or user input.

6 0
3 years ago
1. Avoid unnecessary sliding of T-square or triangles across the drawing<br>​
olga nikolaevna [1]

Answer:

The answer is "True".

Explanation:

It is vertical or ambiguous districts are called a triangle. It typically comes in different sizes but is made of photographic film or plastic. Its triangles more widely shown are 45 grades and 30 grades were x 60. The following illustrations illustrate their correct use of T-square or triangle graph lines. The T-Place a designing tool, which is used to draw horizontal and vertical lines.

8 0
3 years ago
Other questions:
  • The merge process involves which two types of files?
    9·2 answers
  • Amazon uses a customer profiling system whenever a customer visits its website. Using this system, Amazon can offer products tai
    8·1 answer
  • Which camera options shows time to be slowly
    5·1 answer
  • HURYYYY
    6·2 answers
  • Consider the following code segment. The code is intended to read nonnegative numbers and compute their product until a negative
    11·1 answer
  • Which of the following is not true of hardware VPNs?A) should be the first choice for fast-growing networks.B) can handle more t
    6·1 answer
  • Object-Oriented Programming (Using Java Language)
    11·1 answer
  • Please helpppppppppp​
    8·1 answer
  • Anybody know how to code?
    12·1 answer
  • In the context of customer relationship management (CRM) applications, which approach is often chosen by organizations with an e
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!