Data Handling || Type A || Sumita Arora || Class 11 || Computer science || Information practices || Solution
10 = Are these values equal? Why/why not? (i) 20 and 20.0(ii) 20 and int(20)(iii) str(20) and str(20.0) (iv) 'a' and "a”
13 = Two objects (say a and b) when compared using ==, return True. But Python gives False when compared using is operator. Why (i.e, a == b is True but why is a is b False ?)
20. What would following code fragments result in ? Given x =3.
(a) 1 <x
(b) x >= 4
(c) x==3
(d) x==3.0
(e) "Hello"== "Hello"
(f) "Hello" > "hello"
(g)4/2==2.0
(h)4/2==2
(i)x <7 and 4>5
21 = Write following expressions in Python :(a)1/3 b^2 h (b)πr2 h(c) 1/3 πr2 h(d)d = √((x2-x1)^2 )+(y2-y1)^2(e) 〖(x-h)〗^2+〖(y+k)〗^2=r^2(f)x=(-b±√(b^2-4ac))/2a(g)a^n*a^m=a^(n+m)(h)〖(a^n)〗^m=a^nm(i) a^n/a^m =a^(n-m)(j) a^(-n)=1/a^n
22 = Int(‘a’) produces error. Why?
28. Evaluate and justify :(a) 0 or None and "or"(b) 1 or None and 'a' or 'b (c) False and 23 (d) 23 and False(e) not (1 == 1 and 0 != 1) (f)("abc" =="Abc" and not (2 == 3 or 3 == 4) (g) False and 1 == 1 or not True or 1 ==1 and False or 0==0
Q32. A program runs to completion but gives an incorrect results. What type of error would have caused it?
Q33. In Python, strings are immutable while lists are mutable. What is the difference?
Q34. How does the // operator differ from the / operator? Give an example of where // would be needed.
Q35. Mid Air Airlines will only allow carry-on bags that are no more than 22 inches long, 14 inches wide, and 9 inches deep. Assuming that variables named length, width, and depth have already been assigned values, write an expression combining the three that evaluates to True if bag fits within those limits, and False otherwise.
Q36. What are main error types? Which types are most dangerous and why?
Q37. Correct any false statements:
(a) Compile-time errors are usually easier to detect and to correct than run-time errors.
(b) Logically errors can usually be detected by the compiler.
Q38. Differentiate between a syntax error and a semantics error.
Q39. Differentiate between a syntax error and a logical error in a program. When is each type of error likely to be found?
Q40. What is the difference between an error and exception?
Thanks a lot. It was very helpful.
ReplyDeleteWelcome : )
DeleteIs it kind
ReplyDeleteYes, You can ask to your Subject teacher.
DeleteThank you so much ..... It's important for us but please post all the chapter plz plzzzz
ReplyDeleteplzz
Tell me chapters name.
DeleteCh-1 Computer system
ReplyDeleteCh-8 understanding Data
Ch-9 working with Bumpy
Ch-10 database concepts
Ch-11 structure Querty language
Ch-12 emerging Trends
I have uploaded all chapters solutions expect understanding data.
DeleteFor all chapters solutions CLICK HERE
Computer system
ReplyDeleteUnderstanding Data
Working with Numpy
Database concepts
Structure Querty language
Emerging Trends
I have uploaded all chapters solutions expect understanding data.
DeleteFor all chapters solutions CLICK HERE
I was absent in school for long time and my notes are not completed so one of my friend refferd me your blog link...thanks a lot for uploading such a helpful content it helped me completing my note before deadline.....
ReplyDeleteWelcome 😊😊😊😀🤗🤗🤗🤗🤗🤗🤗🤗🤗😀🤗😀.
DeleteVery helpful for me thanks
ReplyDeleteWelcome 😊😊
DeleteThanks you very much😍
ReplyDeleteWelcome 😊😊
DeleteThank you very much for the answers
ReplyDeleteWelcome : )
Deleteplease tell important questions in this chapter i dont want to do this much questions
ReplyDeleteI have uploaded it already.
DeleteThankyou
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )