
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
this document is mainly prepared for
Typology: Lab Reports
1 / 1
This page cannot be seen from the preview
Don't miss anything!
1.Which of the following is a comment in Python? ==> # This is a test
2.What does the following code print out? print("123" + "abc") ==> 123abc
3.Which of the following variables is the "most mnemonic"? ==> x
4.Which of the following is not a Python reserved word? ==> spam
5.Assume the variable x has been initialized to an integer value (e.g., x = 3). What does the following statement d x = x + 2 ==> Retrieve the current value for x, add two to it, and put the sum back into x
6.Which of the following elements of a mathematical expression in Python is evaluated first? ==> Parentheses ( )
7.What is the value of the following expression 42 % 10 ==> 2
8.What will be the value of x after the following statement executes: x = 1 + 2 * 3 - 8 / 4 ==> 5.
9.What will be the value of x when the following statement is executed: x = int(98.6) ==> 98
10.What does the Python input() function do? ==> Pause the program and read data from the user
11.In the following code, print(98.6) What is “98.6”? ==> A constant
12.Which of the following is a bad Python variable name? ==> spam.