stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
CAP209 Unit 2 - Python Basics Flashcards | StudBud
Explore
/
CAP209 Unit 2 - Python Basics
CAP209 Unit 2 - Python Basics
10 terms
·
StudBud Administration
·
6 plays
Test your knowledge on fundamental concepts and syntax of the Python programming language
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
Correct use of math module for sqrt(25)?
math.sqrt(25)
math square root(25)
import math sqrt(25)
sqrt(25)
2
Result of 'print(2 ** 3)'?
9
6
8
2.3
3
Output of 'print(type(10.5))'?
<class 'float'>
<class 'double'>
<class 'int'>
<class 'str'>
4
Output of 'x = "5"; y = int(x) + 2; print(y)'?
TypeError
7
52
5 + 2
5
Output of 'print(round(3.75))'?
4
3.7
3.8
3
6
Correct way to import pi from math?
import math.pi
math.pi
import pi
from math import pi
7
Purpose of input() function in Python?
Display text
Read input as an integer
Read input as a string
Convert numbers to strings
8
What does 'print(3.14159)' display?
3.14159
The value of pi
SyntaxError
pi is 3.14159
9
Output of 'print(10 / 3)'?
3
3.3333333333333335
3.33
3.0
10
How to correctly read an integer input?
str(input())
int(input())
float(input())
input()