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, 22.06.2019 19:30
Once the data center routes to the destination server that hosts the website, what's the next step in the internet process? user’s browser renders html code from destination server into web page request goes through router/model and isp request routed to nameserver and datacenter
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
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
question
Mathematics, 16.12.2020 01:00
question
History, 16.12.2020 01:00
question
Mathematics, 16.12.2020 01:00
Questions on the website: 13722363