Save
Busy. Please wait.
Log in with Clever
or

show password
Forgot Password?

Don't have an account?  Sign up 
Sign up using Clever
or

Username is available taken
show password


Make sure to remember your password. If you forget it there is no way for StudyStack to send you a reset link. You would need to create a new account.
Your email address is only used to allow you to reset your password. See our Privacy Policy and Terms of Service.


Already a StudyStack user? Log In

Reset Password
Enter the associated with your account, and we'll email you a link to reset your password.
focusNode
Didn't know it?
click below
 
Knew it?
click below
Don't Know
Remaining cards (0)
Know
0:00
Embed Code - If you would like this activity on your web page, copy the script below and paste it into your web page.

  Normal Size     Small Size show me how

Quiz 2

COP1000C into comp prog blended 621782

QuestionAnswer
In Python, getting information from the user is done with a special expression called input
In the software development process, which is the task you should do first? analyze the problem
Which of the following is not a correct Python statement? x, y = 3
What is the output from the following program? for x in range(1,4): print(x**2) 1 4 9
What is the output generated from the following loop? for i in range(4): print("hi") hi hi hi hi
Most simple computer programs follow the basic pattern defined by the acronym IPO. What does IPO mean with regards to programming? Input, process, output.
The fragment for i in range(10): is an example of a counted loop
If you want to convert from gallons to liters, which of the following expressions is correct given that one liter is 1.05669 quarts and there are four quarts in a gallon? Question 8 options: liters = gallons * 4.0 / 1.05669
Which of the following is not a valid Python statement? Question 9 options: 3 + 4 = x x = 3 + 4 print(1x1) x = eval(input(1enter x: 1)) a
Which of the following is not a legal identifier? 2spam Question 10 options: spam spam4U spAm 2spam
Which of the following should you use when you want to output the value of the variable x to the screen? Question 2 options: x print x x = eval(input(1enter x: 1)) print(x) print(x)
Which of the following is used in Python to execute statements multiple times? Question 3 options: for print input def for
What does an assignment statement do? Question 4 options: It asks the user to enter a value for the assignment's expression. It outputs the result of the statement's expression to the screen. It represents an algebraic equation that the computer solves. It causes the computer to store the result of the statement's expression in memory so you can use the result in a later Python statement.
Which of the following is a legal identifier? Question 5 options: three_points fieldGoal% 3_points three points Question 5 options: three_points
What is the output generated from the following loop? for i in range(4): print("hi") Question 6 options: 1 2 3 4 hihihihi hi hi hi hi hi hi hi hi hi hi hi hi
When you want to have the user of your program enter a number, which of the following should you use? Question 1 options: input() eval(input()) answer print() input(eval())
Created by: adawa
Popular Computers sets

 

 



Voices

Use these flashcards to help memorize information. Look at the large card and try to recall what is on the other side. Then click the card to flip it. If you knew the answer, click the green Know box. Otherwise, click the red Don't know box.

When you've placed seven or more cards in the Don't know box, click "retry" to try those cards again.

If you've accidentally put the card in the wrong box, just click on the card to take it out of the box.

You can also use your keyboard to move the cards as follows:

If you are logged in to your account, this website will remember which cards you know and don't know so that they are in the same box the next time you log in.

When you need a break, try one of the other activities listed below the flashcards like Matching, Snowman, or Hungry Bug. Although it may feel like you're playing a game, your brain is still making more connections with the information to help you out.

To see how well you know the information, try the Quiz or Test activity.

Pass complete!
"Know" box contains:
Time elapsed:
Retries:
restart all cards