Ask your own question, for FREE!
Computer Science 16 Online
Gucchi:

Which of the following is an example of a runtime error in programming? Not using quotation marks and parentheses to print a string literal Printing an inaccurate fact, like print("Dogs have wings.") Trying to perform an impossible task, like 5 / 0 Using camelcase when a variable name contains two or more words

Gucchi:

am i right with A?

Gucchi:

picking between a and d

SmokeyBrown:

Yup, you're right. The others might be considered logical errors or problems with coding convention, but A is the only one that would cause a runtime error

Gucchi:

oh ok

Gucchi:

it wouldnt be d?

SmokeyBrown:

Using camelcase is considered a good practice because it makes the code easier to read, but your code will still run even if you neglect to do that. The computer can't tell what is a word or what isn't a word, it's just a convention for the benefit of humans reading the code

SmokeyBrown:

For example, I could define a variable using camelcase like firstName = "Smokey" which is what is preferred. But if I defined a variable without camelcase like firstname = "Smokey" I would still be able to use that variable in my code. It's just considered not as easy to tell what the variable name is supposed to be if you write it that way

Gucchi:

oooh okay, it makes sense now

Gucchi:

thank you

SmokeyBrown:

Sure thing. Glad it makes sense :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!