No products in the cart.

why is following code giving error? …

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

why is following code giving error? print(11+3) print('11'+3)
  • 3 answers

Suman Gupta 1 year, 9 months ago

String always add with string not an integer or float .

Abhik G 1 year, 9 months ago

Simply the answer is , string can not be concatenate or added with an integer

Abrar Sheriff 1 year, 10 months ago

The problem is with line 2 of given code because an integer cannot added to a syring value,thus python will give:Type Error: can only concatenate str(not"int")to str
http://mycbseguide.com/examin8/

Related Questions

Write a program for swapping two numbers?
  • 0 answers
Write a program for swapping two numbers
  • 1 answers
What is alu
  • 1 answers
Define packages
  • 0 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App