Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. What is the output of the following code? d = {0:'a', 1:'b', 2:'c', 3:'d'} for i in d.keys(): print(d[i]) a. a b c d

1. What is the output of the following code?

d = {0:'a', 1:'b', 2:'c', 3:'d'}

for i in d.keys():

print(d[i])

a.

a b c d

b.

0 1 2 3

c.

0 a 1 b 2 c 3 d

d.

None of the above

2. Which of the following is a math module function?

a.

sqrt

b.

isnum

c.

randint

d.

factor

3.. Which of the following statements is used to write a single alternative decision structure?

a.

test-jump

b.

if statement

c.

if-else statement

d.

if-call

4. and, or, and not are considered to be

a.

relational

b.

logical

c.

conditional

d.

ternary

5. What is the output of the following?

x = ['ab', 'cd']

for i in x:

i.upper()

print(x)

a.

['ab', 'cd']

b.

['AB', 'CD']

c.

[None, None]

d.

None of he above

6.Each repetition of a loop is known as a(n)

a.

cycle

b.

revolution

c.

orbit

d.

iteration

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions