
MAC - Unit 2
Authored by Ryan Geary
Computers
9th - 12th Grade
Used 10+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which line of code outputs a decimal portion of float stored in the variable: x
print (x / 1000)
print (x - int(x))
print (x)
print (x % 1000)
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Three of the following values could be stored as strings. When would you NOT use a string command?
To store a list of colors
To store decimal values
To store a word
To store values NOT used for calculations
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Consider the following code:
x = int(input("Enter a number: ")
print (x)
What happens if the user types in A?
It prints 65
It prints A
This would cause an error: An integer variable cannot store a string
This would cause an error: int and input cannot be used together.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a data type in Python?
float
string
decimal
integer
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following numbers might this code generate:
import random
random.randint(1,9)
10
1
11
0
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is NOT a build-in function in python?
sqrt()
string()
fabs()
print()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To generate numbers between and including -10 to 10 you would use:
random.random()*20 + (-10)
randint(-10, 10)
random.random(-10, 10)
random.randint(-10, 10)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Cyber Security Homework 1
Quiz
•
7th - 9th Grade
15 questions
INFORMATIKA_8
Quiz
•
7th - 9th Grade
17 questions
ÔN TẬP CUỐI KỲ II TIN 8
Quiz
•
8th - 11th Grade
20 questions
Quiz Informatika Bab 3 & 4
Quiz
•
10th Grade
13 questions
Networks
Quiz
•
7th - 9th Grade
20 questions
Προγραμματισμός Β Λυκείου
Quiz
•
9th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
20 questions
PENGENALAN MS.WORD
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade