
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
Q3 ADT ArrayList
Quiz
•
1st Grade
10 questions
6 класс тест повторение 3 четверти
Quiz
•
1st Grade
10 questions
Ngay 19_04_2023
Quiz
•
1st - 5th Grade
10 questions
Hai Bà Trưng
Quiz
•
1st - 5th Grade
10 questions
Métodos Genéricos e Hilos
Quiz
•
1st - 3rd Grade
10 questions
6 сынып PYTHON тілінде программалау
Quiz
•
1st Grade
8 questions
Test Informatica final nivel1, C++
Quiz
•
1st Grade
10 questions
SỬ DỤNG CÂU LỆNH LẶP
Quiz
•
1st Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
10 questions
Martin Luther King, Jr. For Kids
Interactive video
•
1st - 12th Grade
20 questions
Telling Time to the Hour and Half hour
Quiz
•
1st Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
12 questions
Telling Time to the Hour and Half Hour
Quiz
•
1st - 3rd Grade
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
16 questions
Measurement
Quiz
•
1st Grade
20 questions
CVC Words
Quiz
•
KG - 1st Grade