Computer Science
Which line of code produces an error ?
- "one" + 'two'
- 1 + 2
- "one" + "2"
- '1' + 2
Related Questions
You have the following code segment :
String1 = "my" String2 = "work" print(String1 + String2)
What is the output of this code?
- my work
- work
- mywork
- my
You have the following code segment :
String1 = "my" String2 = "work" print(String1+String2.upper())
What is the output of this code?
- mywork
- MY Work
- myWORK
- My Work
What is the output of this code ?
>>> int("3" + "4")
- "7"
- "34"
- 34
- 24
Which line of code will cause an error ?
1. num= [5, 4, 3, [2], 1] 2. print(num[0]) 3. print(num[3][0]) 4. print(num[5])
- Line 3
- Line 2
- Line 4
- Line 1