
Python Fundamentals Assessment

Quiz
•
Computers
•
University
•
Hard
Abdiel Vega
FREE Resource
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')
Create a free account and access millions of resources
Similar Resources on Wayground
6 questions
AlgoProg-Week2

Quiz
•
University
10 questions
FGCT4023 Topic 6 - Interactivity

Quiz
•
University
10 questions
Python Quiz

Quiz
•
University
14 questions
Файловые системы

Quiz
•
7th Grade - University
10 questions
Command Prompt Quiz

Quiz
•
University
15 questions
Quiz4

Quiz
•
University
15 questions
CSE105_CAP1_filePermissions

Quiz
•
University
10 questions
JAVA I/O

Quiz
•
University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
15 questions
Properties of Equality

Quiz
•
8th Grade - University
38 questions
WH - Unit 3 Exam Review*

Quiz
•
10th Grade - University
21 questions
Advise vs. Advice

Quiz
•
6th Grade - University
12 questions
Reading a ruler!

Quiz
•
9th Grade - University