Can you identify one syntax error and one logic error in these lines? How do you think you could avoid making logic errors like the one in this code?

You are creating a program in which the user will input his or her age. The program will calculate the year that the user was born and will then tell the user which decade he or she was born in. Here is part of the code:if year > 1989 and year < 2000 print("You were born in the 1980s")

Answers

Answer 1

Answer:

(a) Syntax Error: Missing colon symbol

(b) Logic Error: The condition is wrong

Explanation:

The programming language is not stated; so, the syntax error may not be correctly identified.

Assume the programming language is Python, then the syntax error is the missing colon symbol at the end of the if statement. This is so because, Python required a colon symbol at the end of every if condition statement.

The logic error is also in the condition.

The condition states that all years later than 1989 but earlier than 2000 are 1980s. This is wrong because only years from 1980 to 1989 (inclusive) are regarded as 1980s.


Related Questions

Your computer monitor’s power switch is in the ‘ON’ position; however, the display is blank. Which of the following is NOT a likely cause of the problem? *
1 point
the interface cable may be loose
the network adapter is malfunctioning
monitor may be in sleep/hibernate mode
the monitor controls are improperly adjusted

Answers

Answer : Monitor may be in sleep/hibernate mode.

Check out this app! It's millions of students helping each other get through their schoolwork. https://brainly.app.link/qpzV02MawO ​

Answers

Answer:

Tamam hocam o zaman....

______ language is written using 0's and 1's​

Answers

Answer:

Binary language is written using 0's and 1's.

Explanation:

That language of 1's and 0's is called binary. Computers speak in binary because of how they are built.

That language of 1's and 0's is called binary. Computers speak in binary because of how they are built.

Give five examples of top level domain​

Answers

Answer:  .com — Commercial businesses.

.org — Organizations (generally charitable).

.net — Network organizations.

.gov — U.S. government agencies.

.mil — Military.

.edu — Educational facilities, like universities.

Explanation:

ANSWER BELOW.com — Commercial businesses.  .org — Organizations (generally charitable). .net — Network organizations. .gov — U.S. government agencies. .edu — (Educational facilities, like universities.)

Hope this helps!!! :)

Alt +f4 is a short cut of close a document in MS word /ture /false​

Answers

Answer:

True.

Explanation:

Microsoft Word refers to a word processing software application or program developed by Microsoft Inc. to enable its users to type, format and save text-based documents.

In Computer science, there are specific key combinations (short cut) that avail end users the opportunity to perform specific functions without having to go through a series of step.

For example, when you press the Alt button and function key 4 (F4) at the same time, it would close the current open window.

Hence, Alt + F4 is a short cut key that can be used to close a document in MS word.

A
is an list of steps to complete a task. *

Answers

Explanation:

hope it helps

pls mark me brainliest thanks

What is the name of database of viruses that an antivirus software scan for?

Answers

Answer:

Anti virus scanner. i hope :)

Explanation:

In an online shopping application, the primary case type PurchaseOrder has two child case types: Payment and Packaging. In processing PurchaseOrder case PO-11, Payment case Pay-37 and Packaging case Pac-56 are created. Which statement about the processing of PO-11, Pay-37, and Pac-56 is correct?
A. PO-11 has to be resolved before either Pay-37 and Pac-56 is resolved.
B. Pac-56 has to be resolved before Pay-37 is resolved.
C. Both Pay-37 and Pac-56 have to be resolved before PO-11 can be resolved.
D. PO-11 can be resolved when either Pay-37 or Pac-56 is resolved.

Answers

Answer:

The answer is "Option C".

Explanation:

The principal instance type PurchaseOrder has two types of instance children in an online purchasing application: Pay and Packing. Pay case Pay-37 and packing instance Pac-56 are designed to Sales Orders case PO-11 execution. All statements regarding PO-11, Pay-37, and Pac-56 should be settled before PO-11 may be addressed. Both Pay-37 and Pac-56.

Which of the following would not be stored in a cell ?

A. Formula
B. Text
C. Number
D. Chart​

Answers

Answer:

D

Explanation:

Because you can put formulas, text and numbers into a salad, but you can not put a chart interrupt because it won't fit in a cell.

The cafeteria is dark except for one light in the kitchen. The cafeteria manager is in there, counting lunch money. She says that there were some strangers in the school today and they ate lunch in the cafeteria.

Answers

Answer:

Explan

wha??! do u meana

Summary of how I could use my Video Skills outside of school

Answers

Answer:

u can take videos of your journey

- enjoy the moment (like using videos in snap)

- you can record ur life

hope this helps

Answer:

you could make some videos for money

Explanation:

Define computer with its prossing meaning​

Answers

Answer:

The computer is a device that accepts information (in the form of digitalized data) and manipulates it for some result based on a program, software, or sequence of instructions on how the data is to be processed. Today's computers have both kinds of programming.

Explanation:

did you mean-Define computer with its processing meaning. °•°

Computer is a device that takes input, processes it and gives us output.

To indent an entire paragraph or list you should:

A. Use the paragraph spacing icon
B. Use the select icon
C. Use the tab key on your keyboard
D. Use the decrease indent icon

Answers

Answer:

C. Use the tab key on the keyboard

(a easier and fastest way to add a indent in the paragraph)

Other Questions
a traveller from London visits south Africa , explain why this segmentation is not applicable to the tourist Plz help! The question is below! :D Let X denote the number of bars of service on your cell phone whenever you are at an intersection with the following probabilities.x 0 1 2 3 4 5P(X=x) 0.1 0.15 0.25 0.25 0.15 0.1Determine the following probabilitiesa. Two or three barsb. At least one barc. Fewer than two barsd. More than three bars please help guys! i dont wanna fail Which of the following could be a source of noise in the communication process?Different vocabularies of speaker/audienceLoud sounds where communication is taking placeWandering minds during the processAll of the above are possible sources of noiseNone of the above are possible sources of noise. 1. 'The tree on the mountain takes whatever the weather brings. If it has any choice at all, it is in putting down roots as deeply as possible.' Elucidate in reference to the poem 'Wind'. help with the graph Solve the equation and check the result 3(2y-8)-y=9 7.The expression x+y+z is in(a) one variable(b) no variable(c) three variables(d) two variables The button on David's coat has a radius of 4millimeters. What is the button's diameter? someone pls help its due soon A girl and her bicycle have a total mass of 40.0 kg. At the top of the hill her speed is 5.0 m/s, and her speed doubles as she rides down the hill. The hill is 10.0 m high and 100 m long. How much kinetic energy and potential energy is lost to friction What is the molar mass of 12? El Espritu Santo es alma porque?Por favor QUESTION 6 The scale on a map is given as 1 : 320,000. If the distance between the top of the two mountains on the map is 6.8cm, what is the actual distance in kilometres between the two tops of the mountain. ? show working out to prove answer. The type of income statement that reports a series of subtotals such as gross profit, operating income, and income before taxes is a ______ income statement. A. multiple-step B. classified C. single-step D. current how are baby's made full explanation with details please help Triangle ABC has vertices A (-2, 2), B (2, 4) and C (3, -1). What are the coordinates of A' after a dilation by a scale factor of 2.5? simplify -5--44i have no idea write an analysis essay that compares and contracts two poems, one by Walt Whitman and one by Emily Dickson