
Type conversion
Authored by Trung Tran
Computers
1st Grade
Used 5+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, ép kiểu tường minh được thực hiện bằng cách nào?
Sử dụng hàm cast()
Sử dụng hàm int(), float().
Tự động xảy ra mà không cần phải sử dụng hàm hoặc từ khóa
Sử dụng từ khóa as
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi bạn muốn ép một biến có giá trị 3.14 từ kiểu dữ liệu float sang kiểu dữ liệu int, bạn sử dụng lệnh nào dưới đây?
int(3.14)
float_to_int(3.14)
convert(3.14, int)
parse_as_int(3.14)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi bạn cần ép kiểu một chuỗi ký tự "True" thành kiểu dữ liệu boolean, câu lệnh nào sau đây sẽ thực hiện điều này?
bool("False")
bool("True")
convert_to_bool("True")
parse_as_boolean("True")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Bạn có một chuỗi ký tự "hello". Nếu bạn cố gắng chuyển đổi chuỗi này thành số nguyên, kết quả sẽ như thế nào?
Chuỗi được chuyển thành số nguyên 0
Chuỗi được chuyển thành số nguyên 1
Chuỗi được chuyển thành số nguyên dựa trên mã ASCII của ký tự đầu tiên
Lỗi
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Giả sử em có một biến số thực x = 8.99 và một biến số nguyên y = 3. Khi bạn thực hiện phép tính result = x / y, kiểu dữ liệu của biến result sẽ là gì?
float()
int()
2
Lỗi
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
10 questions
Paint 3d
Quiz
•
1st - 5th Grade
10 questions
Soạn thảo văn bản Microsoft Word
Quiz
•
1st Grade - University
10 questions
Bài tập môn Tin học lớp 3
Quiz
•
1st Grade
10 questions
8 сынып Python
Quiz
•
1st Grade
10 questions
Thư điện tử _ CC
Quiz
•
1st Grade
10 questions
BÀI 14. KHÁM PHÁ MÔI TRƯỜNG LẬP TRÌNH TRỰC QUAN
Quiz
•
1st Grade
10 questions
Tema if
Quiz
•
1st - 10th Grade
10 questions
Python-Partie7
Quiz
•
1st 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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Computers
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
10 questions
Exploring Rosa Parks and Black History Month
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
13 questions
Fractions
Quiz
•
1st - 2nd Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade
15 questions
Place Value tens and ones
Quiz
•
1st Grade
16 questions
Money - Coins
Lesson
•
1st - 2nd Grade
20 questions
Halves and Fourths
Quiz
•
1st Grade