Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1)what are the values displayed by the following program: X = 7 for N in range(X): Print(N*2-1) : Type error 0 1 3 5 7

1)what are the values displayed by the following program:

X = 7

for N in range(X):

Print(N*2-1) :

Type error

0 1 3 5 7 9 11 13

1 3 5 7 9 11 12

Syntax error

name error

2) What will be the output of the following program :

N = input(" please enter something:")

X = N % 2

if X!= 0:

print("odd")

else:

print("even"):

Even

nothing , the program will crash

odd

it depends on the value entered by the user

3) In pyhton, while loops can only be used when the number of repetitions is not known in advance : TRUE OR FALSE

4) Which of the following statement is wrong:

z = x // y

L = message[0]

number = number + 1

first name = " Driss"

5) Print("hello everyone ) , this code will

Raise a name error

raise a type error

raise a syntax error

6)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions