subject

1. Select the statement you would need with in a “while true:” loop to control the number of iterations: a) for statement
b) nested while statement
c) range statement
d) relational operators

2. For which programming task would you use a while loop?
a) Computing the average of a list of 30 integers
b) Copying the contents of one list of 500 characters to another list
c) Drawing a circle with a specified radius
d) Waiting for a keyboard key to be pressed

3. For a Python program that reads every third integer in a list, which arguments of the range function should you specify?
a) A start, a stop, and a step argument
b) A start and a stop argument
c) No arguments
d) One stop argument

4. Which of the following is an accurate description of the way in if statement operates?
a) When the if conditional evaluates to False, the if clause statements are run.
b) When the if conditional evaluates to True, the if clause statements are run.
c) Program execution returns to the beginning of the if statement after the if clause statements are run.
d) When the if conditional evaluates to True, the program execution continues after the if statement.

5. Suppose you are writing a program that counts the number of alphanumeric characters in every sentence in the document. Would you use a for loop or a while loop to process each sentence, and why?
a) A for loop because the program must establish maximum sentence length.
b) A for loop to control the number of characters the program will process in each sentence.
c) A while loop because the program cannot predict the length of a sentence.
d) A while loop to specify the list of alphanumeric characters the program will recognize.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 24.06.2019 13:30
Which type of excel chart should be used to track students’ progress on test grades? line column bar pie
Answers: 2
question
Computers and Technology, 24.06.2019 14:00
Which computer tools allow you to communicate with coworkers, family,and friends
Answers: 1
question
Computers and Technology, 25.06.2019 10:00
One way news orginaztions can influence people is by: a.slanting information b.accepting all beliefs c.sharing a true perspective d.giving people money
Answers: 1
You know the right answer?
1. Select the statement you would need with in a “while true:” loop to control the number of iterati...
Questions