Tag: Quizs Question
-
Python Multiple Choice Quizs Question– String
Q 1. The output of executing string.ascii_letters can also be achieved by:A. string.ascii_lowercase_string.digitsB. string.lowercase_string.uppercaseC. string.lettersD. string.ascii_lowercase+string.ascii_uppercase Show Answer Answer:-D. string.ascii_lowercase+string.ascii_uppercase Explanation Execute in shell and check. Q 2 . What will be the output of the following Python code? A. ollehB. helloC. hD. o Show Answer Answer:-D. o Explanation 1 corresponds to the last index.…
-
Python Quizs Question and Answers – While and For Loops – 2
Q 1. What will be the output of the following Python code? x = “abcdef” while i in x: print(i, end=” “) A. a b c d e fB. abcdefC. i i i i i i …D. error Show Answer Answer:-D. error Explanation NameError, i is not defined. Q 2. What will be the output…
-
Python Quizs Question and Answers – Formatting – 1
Q 1. What will be the output of the following Python expression if x=456? print(“%-06d”%x) A. 000456B. 456000C. 456D. error Show Answer Answer:-C. 456 Explanation The expression shown above results in the output 456. Q 2. What will be the output of the following Python expression if S=345? print(“%06d”%S) A. 345000B. 000345C. 000000345D. 345000000 Show…
-
Python Quizs Question and Answers – Bitwise – 2
Q 1. It is not possible for the two’s complement value to be equal to the original value in any case.A. TrueB. False Show Answer Answer:-B. False Explanation In most cases the value of two’s complement is different from the original value. However, there are cases in which the two’s complement value may be equal…
-
CSS Quizs Question & Answers – Border Elements
Q1. Which of the following property defines the style for the right border of an element?A. border-spacingB. border-spacingC. border-rightD. border-right-style Show Answer Answer:-C. border-right Explanation Syntax: border-right-style: dashed | dotted | double Q 2. Which of the following property defines the color of an element’s top border?A. border-colorB. border-topC. border-top-color-webkitD. border-top-color Show Answer Answer:-D. border-top-color…
-
CSS Quizs Question & Answers – CSS Border
Q 1. Which CSS property can be used to set the image as border instead of the border style?A. background-imageB. border-imageC. background-image-sourceD. border-image-source Show Answer Answer:-D. border-image-source Explanation The border-image-source property specifies the path to the image to be used as a border (instead of the normal border around an element). Q 2. In how…
-
CSS Quizs Question & Answers – Specification of CSS
Q 1. What will be the output of below mentioned code snippet? h1 {color: “green”;} A. heading becomes greenB. heading becomes dark-greenC. error occorsD. nothings happen Show Answer Answer:-D. nothings happen Explanation Output of above code snippet won’t happen as the declaration syntax is wrong. The correct declaration is : h1 { color: green; }…
-
CSS Quizs Question & Answers – CSS Versions
Q1 . Which of the following CSS property is used to give a line over the text?A. text-decoration: underlineB. text-decoration: overlineC. text-decoration: line-throughD. text-decoration: none Show Answer Answer:-B. text-decoration: overline Explanation Text-decoration is a CSS property used to decorate the text. The text-decoration property takes many values such as overline, underline, line-through, none, inherit, etc.…
-
CSS Quizs Question & Answers – CSS Functions
Q 1. Which of the following function flips an element’s colors, for use by the filter property? A. flip() B. invert() C. contrast() D. image() Show Answer Answer:- B. invert() Explanation Q 2.Which of the following function applies a saturation effect to an element’s color, making it appear more or less vivid, for use by…