Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!