What is the final result of the expression 4 + 5 * 3?, 27, 12, 21, 19, What is the final result of the expression 7 / 2 + 6?, 0, 9.5, 9, 0.875, Choose the print statement below that will cause an error. Assume num = 6 and name = "Isabella"., print(name + ":")\nprint(num), print(name + " wants " + "num " + "candies"), print(name + ": " + str(num)), print(name + ": " + num), Which statement below will cause an error?, ans = "hi" * 8, ans = "hi" + 9, ans = "hi" + "hi" + "hi", ans = ("a" * 4) + "b", What does the following program print? a = "hi" b = 4 c = a * b print(type(c)), A. <class 'str'>, B. <class 'int'>, C. <class 'float'>, The program crashes., Suppose you have a variable defined as: a = "4" a = "4" What is the variable type of a?, str, int, float, number, Choose the option that correctly prints out the variable(s)., x = "codehs"print(int(x)), num = 8\nprint("num"), name = "Alyx"\nage = 32\nprint(name + "is " + age), language = "Python"\nprint("I'm learning " + language), What kind of data does a float variable contain?, Whole numbers, Words, Numbers with decimal components, A float is not a Python variable type, What does the following code print? x = 3.4 y = 1 print(int(x)) print(x + y), 3.4\n4.4, 3\n4.4, 3\n4, The code causes an error, Which is the best way to get a number from the user for a mathematical equation?, num = str(input("Enter a number: ")), num = number(input("Enter a number: ")), num = input("Enter a number: "), num = int(input("Enter a number: ")), What is the final result of the expression 2**3?, 6, 8, 2, Invalid Python expression, What character do Python comments begin with?, #, %, -, ", What is the difference between a binary operator and a unary operator?, Computers can use binary operators, but not unary operators., A unary operator needs two things, while a binary operator needs one., A binary operator needs two things, while a unary operator needs one., Binary operators are for arithmetic, unary operators are for strings., On which line will Python produce an error? weight = input("How much do you weigh? ") oz_water = weight / 2 print("You should drink " + str(oz_water)) print("ounces of water every day if you weigh " + weight), Line 1, Line 2, Line 3, Line 4, In what order should these statements be executed? A) response = input("Do you like cheese? ") B) print("You have chosen " + confirm) C) print("You responded " + response) D) confirm = input("Are you sure? "), A, B, C, D, B, C, A, D, A, C, D,B, C, B, A, D, What is the output of the following program if the user enters "Florence" and "Fernandez"? first_name = input("What is your first name? ") last_name = input("What is your last name? ") whole_name = first_name + last_name print(whole_name), Fernandez Florence, Florence\nFernandez, FlorenceFernandez, Florence Fernandez, Which is a properly formed Python variable name?, user_age, uSeRaGe, user!age!, 1user_age, Which of the following is NOT a Python variable type?, int, str, float, number, Choose the correct declaration of a float variable with the value 3.14., pi = "3.14", pi = int(3.14), pi = 3.14, float pi = 3.14.
0%
Python Basics Multiple Choice Questions
Chia sẻ
Chia sẻ
Chia sẻ
bởi
Gulnaztor
Chỉnh sửa nội dung
In
Nhúng
Nhiều hơn
Tập
Bảng xếp hạng
Hiển thị thêm
Ẩn bớt
Bảng xếp hạng này hiện đang ở chế độ riêng tư. Nhấp
Chia sẻ
để công khai bảng xếp hạng này.
Chủ sở hữu tài nguyên đã vô hiệu hóa bảng xếp hạng này.
Bảng xếp hạng này bị vô hiệu hóa vì các lựa chọn của bạn khác với của chủ sở hữu tài nguyên.
Đưa các lựa chọn trở về trạng thái ban đầu
Đố vui
là một mẫu kết thúc mở. Mẫu này không tạo điểm số cho bảng xếp hạng.
Yêu cầu đăng nhập
Phong cách trực quan
Phông chữ
Yêu cầu đăng ký
Tùy chọn
AI Enhanced: Hoạt động này chứa nội dung do AI tạo.
Tìm hiểu thêm.
Chuyển đổi mẫu
Hiển thị tất cả
Nhiều định dạng khác sẽ xuất hiện khi bạn phát hoạt động.
)
Mở kết quả
Sao chép liên kết
Mã QR
Xóa
Bạn có muốn khôi phục tự động lưu:
không?