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 20:00
What is used to analyze and summarize your data without graphical support
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
Animations and transitions are added from the
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. andre was recently hired by an organization to check for system vulnerabilities. he is supposed to exploit these vulnerabilities and create a report on the extent of damage to which the system was susceptible. what position does andre hold in this organization? a. information security analyst b. information assurance manager c. penetration tester d. network security engineer e. chief information security officer
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
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
Questions on the website: 13722367