What is wrong with the following code?
numl = int (input("Enter a number: "))
numz = int (input("Enter a number: "D)
num3 = int (input("Enter a number: "))
print ("The average is: + (numl + num2 + num3/3)
The last line should be print ("The average is: (numl + num2 + num/3)
The variables should be lnum, 2num, Bnum
It needs a into command
It needs a stro command

Answers

Answer 1

Code:

numl = int (input("Enter a number: "))

num2 = int (input("Enter a number: "))

num3 = int (input("Enter a number: "))

print ("The average is:" + ((numl + num2 + num3)/3))

Answer:

It needs a str command

Explanation:

Given

The above code

Required

Determine and correct the error

At the last line of the code, there is an attempt to print the average of the three numbers.

However, this will return an error because:

In order to print the literal "The average is:" and the numeric value of (numl + num2 + num3)/3, a str command is needed.

This converts (numl + num2 + num3)/3 to a literal and then print without error.

So, the correct instruction is:

print ("The average is:" + str((numl + num2 + num3)/3))


Related Questions

True or False? Jerry's company is beginning a new project, and he has been assigned to find a telecommunications tool that will improve operational efficiency. He lists the tasks that he wants the tool to be able to do. Then he does some research to find out what is available. The only thing remaining for Jerry to consider is where he can get the best deal on the technology.

Answers

Answer:

True

Explanation:

Answer:

It's false it took the assessment

An else statement will be executed in what situation?
the if statement is true
the if statement is false
there is a syntax error
the elif statement is executed

Answers

Answer:

The second one.

Explanation:

An `else` statement is like the alternative route for the code. I like to put it in my own words like, "If the user puts a number insted of a letter tell them they did a good job! Else(Otherwise) Tell them they need to try again.

I hope I helped!

Answer:

b) the if statement is false

Explanation:

The else statement is performed if the if statement's condition is not fulfilled. An else statement executes if an if statement is false. The else statement gives the code a backup if the if statement fails. If the if statement fails, this might propose a different course of action.

An if statement may test whether an integer is even or odd by dividing it by two. This tells the computer whether the number is even or odd. If the input number is divisible by 2, the software will print "the number is even" if it is the computer that determines whether the number is even or odd. If the input number is divisible by 2, the software will print "the number is even" if it is. The else statement may show that the "number is odd" if the integer cannot be divided by two.

A MailTip is an instantaneous pop-up message that

warns users of bad email addresses.

forces the sender to check their grammar and spelling.

gives you real-time information about the message you are creating.

provides helpful hints on how to navigate the message controls.

Answers

Answer:

its (c)

Explanation:

hellllllllllp i need hlel dad

Answers

miss girl whatttttttttt

In a particular spreadsheet, the data in each cell is password protected. When cells are selected, the formula is visible
in the formula bar. Which is true?
O The cells are locked and hidden.
The cells are locked and unhidden.
The cells are unlocked and hidden.
O The cells are unlocked and unhidden.

Answers

Answer:

Explanation:

Locked and hidden

Lilly is new to her company. Give Lilly some advice about effective communication in an e-mail. Include a subject line.

Answers

Effective communication is an important aspect throughout all aspects of life, but it is especially important when in a new job. This is because your communication, or even lack of communication could very likely change you or a co-workers life. For example, let's say a co-worker needed you to do something, and you couldn't do it, but didn't tell them, then they could get into trouble and potentially fired for not doing the work that they entrusted to you. In some cases, they'll blame you, and you can get fired.

can someone help me on codehs. its 7.1.5: initials. here is what your supposed to do

Write a function called initials that will take a first and last name and return their initials using the following format:

initials("Tracy", "Turtle")
# => "T.T."
initials("Peter", "Parker")
# => "P.P."

Answers

Answer:

first = input( "What is your first name? " )

last = input( "What is your last name? " )

def initials():

   print ("Your initials are: "+first[0]+"."+last[0]+".")

initials ()

Explanation:

it works when I test but it won't submit. Hope this helps

Following are the program to prints the initials of the input value.  

Program Explanation:

Defining a class Main.Inside the class, a method "initials" is declared that takes two string variables "first, last" in the parameter.Inside the method, a return keyword is defined that uses the charAt method that returns the first character value of the parameters. In the next step, the main method is defined.Inside the main method, a print method is declared that calls initials method that accepts value in the parameter and prints its value.

Program:

public class Main //defining a class Main

{

   static String initials(String first, String last)//defining a String method initials that input two variables in the parameter

   {

       return first.charAt(0)+"."+last.charAt(0)+".";//using charAt method that returns first character value

   }

 public static void main(String[] as) //defining main method

 {

   System.out.println(initials("Tracy", "Turtle"));//using print method that calls initials method that accepts value in parameter

   System.out.println(initials("Peter", "Parker"));//using print method that calls initials method that accepts value in parameter

 }

}

Output:

Please find the attached file.

Learn more:

brainly.com/question/2810164

4.2.10: Multiplication Table: Create a program using a for loop which will print out the 4’s times table through 10.

Answers

I included my code in the picture below. Best of luck.

Where do you place the logical test argument in an IF function formula?
.before the IE function
.the first argument listed after IF
.the second argument listed after IF
.the third argument listed after IF

Answers

Answer:

The first argument listed after IF

Explanation:

When the two variables are listed next to each other, Excel will find and calculate the correlation between them.

Answer:

B. the first argument listed after IF

Explanation:

You should see the following code in your programming
import simplegui
def draw_handler(canvas);
# your code goes here
frame = simplegui.create_frame('Testing', 600, 600)
frame.set_canvas_background("black")
frame.set_draw_handler(draw handler)
rame.start()

Answers

Answer:

import simplegui

import random

def draw_handler(canvas):

for x in range(1000):

colorList = ["Yellow", "Red", "Purple", "White", "Green", "Blue", "Pink", "Orange"]

c = random.choice(colorList)

x = random.randint(1,600)

y = random.randint(1,600)

canvas.draw_point([x, y], c)

frame = simplegui.create_frame('Testing', 600, 600)

frame.set_canvas_background("Black")

frame.set_draw_handler(draw_handler)

frame.start()

Explanation:

I used a for loop, setting my range to 1000 which is how you create exactly 1000 points. Next, I defined my color array, my x randint value, and my y randint value. I set both the x and y randint values to 1 - 600 since the frame is 600x600. The rest is pretty self explanatory.

Steven wrote an algorithm for his coding class that explains how he puts on his shoes. Which is the correct sequence of steps that Steven used?

Place foot in shoe, untie laces, tie laces
Tie laces, place foot in shoe, untie laces
Untie laces, place foot in shoe, tie laces
Untie laces, tie laces, place foot in shoe

Answers

untie laces ,place foot in shoe, tie laces maybe?

Calling all engineers and tech geniuses. Brianliest for correct answer.

My cousin has this toy walkie talkie but it doesn’t work without a battery. I want to put a battery in but I don’t know what to put in because there is no label saying so.

Please help!

Which battery should I put in and where do I get it from???

Answers

Answer:

so id assume you need a battery like in the photo. to attach it you should be able to look at the top of the battery and just click the battery component onto the battery. sorry if im using the incorrect terms.

Question #1
Dropdown
You entered the following line of code in IDLE.
>>> guess = input("Enter a guess: ")
This is the result.
Enter a guess: 2
What data type is the variable guess?
string
int
float

Answers

Answer:

int

Explanation:

Here is the input:

"Enter a guess: 2"

The input is the number. The type of variable for whole number (number without a decimal point) is integer, or int in short form.

If the input would be:

"Enter a guess: Hello"

Then the type of variable would be string, because it's a text input.

And if the input would be:

"Enter a guess: 1.5"

Then the type of variable would be float, because it's a number with a decimal place.

In the variable guess the type of data type is int. The correct option is B.

What is a data type?

A variable's data type and the kinds of mathematical, relational, and logical operations that can be performed on it without producing an error are classified as data types in programming.

Integral, Floating Point, Character, Character String, and Composite types are the five basic kinds of data types that are recognised by the majority of current computer languages.

Each broad category also includes a number of particular subtypes.

The most common integer data type in SQL Server is the int data type. When integer values may be larger than what the int data type can handle, the bigint data type is meant to be used.

Thus, the correct option is B.

For more details regarding data type, visit:

https://brainly.com/question/14581918

#SPJ5

Gina, an IT professional, noticed that the servers were running very slowly. She evaluated the system and made a recommendation to the workers at her company to improve the performance of the system. She told them that the most important thing they could do to help was to _____.


stop opening attachments

delete unneeded e-mail

log off the system for at least two hours each workday

limit the number of e-mails they replied to each week

Answers

Answer:

delete unneeded e-mail

Explanation:

this will free up space

delete unneeded e-mails

Explanation:

once you delete unneeded emails you wont have an risk for an slower functioning work day

(I WILL GIVE BRAINLIEST) Which steps will delete an appointment?

left-clicking on the appointment and hitting delete on the keyboard
double-clicking on the appointment and hitting delete on the keyboard
right-clicking the Calendar folder and hitting delete on the keyboard
clicking the Calendar folder and hitting delete on the keyboard

Answers

Answer:

right clicking should be your answer

How many comparisons will be done to find 8 in this list using a linear search?

2, 4, 6, 8, 10, 12

Answers

Answer:

I think 4 comparisons

RIGHT ANSWER GETS BRAINLEST

Complete the code.

You are writing a loop to allow the user to enter data until they enter a "Q". You want to allow them to enter an upper- or lowercase "Q".

if yourTeam.
() == "q":
break


The options they give are:
Upper
Compare
lower

Answers

Answer:

sir i beleive lower is your answer, i know it isnt upper.

Explanation:

:D

Answer:

lower

Explanation:

i just did the quiz and got it right :)

Does anyone know what these two things are?

Answers

Cd and headphones :)

Answer:

CDs/DVDs and a headset.

Explain why configuration is essential in planning a project.

Answers

Answer:

Configuration management system helps in managing versioning of project management plans, documents and project components. This system may include Change Control System. Because the major cause of taking a new version for a component, document or plan in a project is a change

Other Questions
A piece of putty and a tennis ball with the same mass are thrown against a wall with the same velocity. Which object experiences a greater force from the wall or are the forces equal he knows math in spanish The cafeteria can serve 32 lunches in 5 minutes. How long will it take them to serve 57 lunches? answer the question below (1) Great Britain is the shortened name for the United Kingdom of Great Britain and Northern Ireland. (2) The U.S. fought for independence from England in the 1700s. (3) Great Britain is made up of England, Wales, Scotland, and Northern Ireland. (4) England, Scotland, and Wales are on one island, and Northern Ireland is on another island. (5) These islands are located in the Atlantic Ocean, across the English Channel from France and the rest of Europe.Which sentence least supports the main idea? A. sentence 2 B. sentence 1 C. sentence 4 Isabel offers to buy a team photo for 8 of her teammates,but 2 of them don't want one.If a team photo costs $5, how much will Isabel spend on her teammates?Choose the correct expression and solution to this problem.Will give brainliest A new car is purchased for $32,500. The car depreciates every year atarate of 14%. Write an exponential function that represents that situation Ask the user to type in an integer greater than 50 and assign it to a variable called x. Write a program to calculate the sum of squares of positive integers. The loop should stop when the sum is greater than x. At the end of the loop print how many numbers were used to calculate the sum. For example, if x is 100, sum will be 91, and six numbers (1 to 6) were used to calculate sum. Which of the following gases was NOT part of Earths original atmosphere? Please! I need help. I have to turn this in tonight. And I'm stuck on this problem.A music company sells music to download. They charge $7.00 for each album and $1.50 for each song. On Monday, the company sold a combined total of 170 albums and songs that totaled $442.00. On Monday, what was the ratio of the number of albums sold to the number of songs sold?1) 1:42) 7:13) 5:14) 1:14 How is the Multiagency Coordination (MAC) Group interconnected with the other NIMS Command and Coordination structures? Which description could be written as a linear function? aeight more than twice a number bnine more than one divided by a number cten more than the square of a number dthree more than the product of two numbers SOMEONE HELP BECAUSE I DONT GET THIS NEED HELP ASAP WILL GIVE BRAINLIEST 100ptsUse the right trig notes to complete the following questions. upload your completed task at the bottom of the assignment for extra credit. What can be concluded from the following data?#1DNA profiling of a male with Down syndrome.#2Karyotype of a male with a normal set of chromosomes.#3DNA profiling of a male with a normal set of chromosomes.#4Karyogram of a male with Down syndrome. Which of the following is a true statement about this equation?y = -x 2 + 3x + 2A. The equation is a function.B. The equation is not a function.C. A horizontal line test would show that the equation is a relation but not a function.D. A vertical line test would show that the equation is a relation but not a function. Combine like terms to simplify the expression: Paisley set up the following equation to solve a math problem: 33 + 57 + x = 180. What could the x represent? Details: Cargo ship can carry 21,600 tons Cars weigh 3.6 tons each Trucks weigh 7.5 tons each y = number of cars x= number of trucks Your equation was 3.6y + 7.5x = 21600 Find the number of trucks that can be shipped if there are no cars. f (x) = 3x^2 - 10x + 4