题目
题目

ECON3310001.1251 Quiz 1: Introduction to Programming

单项选择题

Suppose we write var1 = "It's me, Mario!" and var2 = 34.5. What happens if we run var1 + var2?

选项
A.An error message saying var1 doesn't exist.
B.An error message indicating that the variable types are incompatible.
C.R won't print anything.
D.R will print just the text "It's me, Mario!".
E.R will print "It's me, Mario!34.5".
查看解析

查看解析

标准答案
Please login to view
思路分析
Consider what happens in R when you apply the + operator between values of incompatible types. Option 1: 'An error message saying var1 doesn't exist.' This is false because var1 was defined as a string literal "It's me, Mario!"; there is no missing variable name issue here, so the error about var1 not existing does not apply. Option 2: 'A......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!