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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 14:30, HarryPotter10
Open this link after reading about ana's situation. complete each sentence using the drop-downs. ana would need a minimum of ato work as a translator. according to job outlook information, the number of jobs for translators willin the future.
Answers: 3
image
Computers and Technology, 24.06.2019 07:30, isabelgalvarado2838
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
Answers: 2
image
Computers and Technology, 24.06.2019 08:00, qveenvslayin
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
image
Computers and Technology, 24.06.2019 08:10, anthonysutton82
Where are american poets found in the dewey decimal system
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 in other subjects: