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 3

COP1000C into comp prog blended 621782

QuestionAnswer
In Python, what is the result of 2 / 5? 2 0 0.4 5 0.4
What is the result of float(int(3.5))? Question 3 options: 4 3 4.0 3.0 3
If you want to use the sin function in the math library, as x = sin(3.14), how should you write the import statement? Question 4 options: import sin import math from math import sin An import statement is not needed. import math
If you want to use the sin function in the math library, as x = math.sin(3.14), how should you write the import statement? Question 5 options: import math
Which of the following is a correct Python expression? Question 6 options: X = 2 *A + 2B F = (9/5)*C + 32 F = (9/5)C + 32 X = B**2 - 4A b
The Python numeric type for representing numbers containing fractional values is Question 7 options: int decimal float real float
In Python, what is the result of 2 // 5? Question 8 options: 2 0 0.4 5 0.4
The Python numeric type for representing positive or negative whole numbers is: Question 9 options: int float whole int
In Python, what is the result of 2 % 5? Question 10 options: 0.40 5 0 0.40
If you want to use the accumulator pattern to add up a sequence of numbers, which of the following would be the correct initialization statement for the accumulator variable? Question 1 options: total = 1 total = 0 total = -1 total = [] total = 0
What is the output from the following program fragment? for i in range(1,5): print(2 * i,end=" ") Question 2 options: 2 4 6 8 10 1 2 3 4 5 1 2 3 4 2 4 6 8
What is the output from the following program fragment? for i in range(1,5): print(2 * i,end=" ") Question 2 options: 2 4 6 8 10 1 2 3 4 5 1 2 3 4 2 4 6 8 2 4 6 8
Which of the following would be equivalent to the Python expression y = round(x)? Question 3 options: y = math.floor(x) y = int(x) y = int(x + 0.5) y = math.ceil(x) y = int(x)
In Python, what is the result of the expression 2.0 + 5 // 2? Question 4 options: 4 4.0 4.5 none of the above 4.0
In Python, what is the result of 2 % 5? Question 5 options: 0.40 5 0 0
What is the result of float(int(3.5))? Question 9 options: 3 4 4.0 3.0 4.0
In Python, what is the result of 2 / 5? Question 10 options: 5 0.4 2 0 0
Which of the following statements is true about the Python int and float types? Both int and float values have a limit on the largest value they can hold. Int values are stored exactly and float values are usually approximations. Int and float values are both stored exactly. Neither int values nor float values are stored exactly.
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