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
共享
共享
共享
由
Gulnaztor
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
AI增强版:本活动包含AI生成的内容。
了解更多信息。
切换模板
显示所有
播放活动时将显示更多格式。
)
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?