
Python Fundamentals Assessment
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Abdiel Vega
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
1. What data type does Python assign to the value "123"? a) int b) float c) str d) bool Answer: c) str
list
c) str
float
int
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
2. Which of the following operators has the highest precedence in Python? a) Logical operators b) Comparison operators c) Arithmetic operators d) Assignment operators Answer: c) Arithmetic operators
c) Arithmetic operators
Bitwise operators
Identity operators
Membership operators
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
3. How do you perform type conversion from a string to an integer? a) int("123") b) float("123") c) str(123) d) int.to("123") Answer: a) int("123")
int(123)
float(123)
str.to(123)
a) int("123")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
4. What does the following code output? a = [1, 2, 3] print(a[1]) a) 1 b) 2 c) 3 d) Error Answer: b) 2
0
4
b) 2
1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
5. Which statement is used for conditional branching in Python? a) switch b) goto c) if d) while Answer: c) if
c) if
loop
select
case
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
6. What will the following code output? if 5 > 3: print("True") else: print("False") a) "True" b) "False" c) None d) Error Answer: a) "True"
True or False
5 > 3
True
True and False
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
7. What is the correct syntax to open a file for writing in Python? a) open("file.txt", "w") b) open.write("file.txt") c) file.open("w", "file.txt") d) open("file.txt", "r") Answer: a) open("file.txt", "w")
a) open("file.txt", "w")
open('file.txt', 'write')
file.write('file.txt')
open(file.txt, 'w')
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
ADB Quiz #1
Quiz
•
University
10 questions
internet
Quiz
•
University
10 questions
Quiz Elektronika dan PCB Design: Tantangan Cerdasmu!
Quiz
•
University
10 questions
DL Refresher
Quiz
•
KG - Professional Dev...
12 questions
Quiz PTI Multimedia 23/24 Pertemuan 3-4
Quiz
•
University
10 questions
IoT Lecture 8 - Data and Analytics for IoT
Quiz
•
University
10 questions
UTILITY PROGRAM
Quiz
•
University
11 questions
Email of request
Quiz
•
12th Grade - Professi...
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
