Python es un lenguaje practico y fácil de aprender.
Bienvenido Python Para Ingenieros de Python for Everybody
In the following code,
print(98.6)
A conditional statement
An iteration / loop statement
A constant
A variable
Which of the following is a comment in Python?
// This is a test
/* This is a test */
* This is a test
# This is a test
What does the following code print out?
print("123" + "abc")
123abc
123+abc
This is a syntax error because you cannot add strings
hello world
x = 42
A function
A Central Processing Unit
Which of the following is a bad Python variable name?
_spam
Spam
SPAM23
23spam
Which of the following variables is the "most mnemonic"?
hours
variable_173
x1q3z9ocd
x
Which of the following is not a Python reserved word?
if
speed
else
for
continue
iterate
break
Assume the variable x has been initialized to an integer value (e.g., x = 3). What does the following statement do?
x = x + 2
Retrieve the current value for x, add two to it and put the sum back into x
Produce the value "false" because "x" can never equal "x+2"
This would fail as it is a syntax error
Create a function called "x" and put the value 2 in the function
Which of the following elements of a mathematical expression in Python is evaluated first?
Parentheses ( )
Subtraction -
Addition +
Multiplication *
What is the value of the following expression
42 % 10
2
1042
420
10
What will be the value of x after the following statement executes:
x = 1 + 2 * 3 - 8 / 4
4
15
5.0
3.0
What will be the value of x when the following statement is executed:
x = int(98.6)
100
99
98
6
What does the Python input() function do?
Take a screen shot from an area of the screen
Read the memory of the running program
Connect to the network and retrieve a web page.
Pause the program and read data from the user
Py4E, sección 5. Iteraciones L a sección 5, se enfoca en el concepto de iteraciones y bucles en Python, que son fundamentales para repeti...
No hay comentarios.:
Publicar un comentario