subject

How do you prevent a while loop from becoming an infinite loop? How could internal documentation improve this program?
x = 90
a = 37
c = x/a
print(c)
You learned in this unit that Python requires your syntax to be strictly correct. For example, if you don’t indent a line after an if statement, your program will crash, and you will get an error message. Why do you think Python is designed with such strict rules? Would it be better if Python were more flexible? Why or why not?
Consider this program:
flavors = ["mild", "medium", "hot", "extra hot"]
choice = int(input("How many options do you want?"))
for i in range(choice):
print("You can order", flavors[i])
Can you anticipate a situation in which this program will crash? What could you do to prevent that situation from happening?
You learned in this lesson that you can use negative index numbers to access list items starting at the end of the list. In what situations might this be useful?

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
You know the right answer?
How do you prevent a while loop from becoming an infinite loop? How could internal documentation im...
Questions
question
SAT, 10.10.2019 19:00
question
Biology, 10.10.2019 19:00
Questions on the website: 13722367