Python Questions Answers-language basic syntax


Python language basic syntax

1. In Python, you can define a variable without specifying its data type?
a. True    b. False Check answer 2. The print function is used to receive data from keyboard in a  program.
a. True   b. False
Check answer 3. The input function can be used to read a value from keyword. However, by using this statement you need to supply the value in single quotes.
a. True   b. False
Check answer 4. In Python, by using the raw_input function the value input from keyboard can be read without the use of single quotes.
a. True    b. False
Check answer 5. In Python, to access the type of a variable, you can the type function.
a. True    b. False
Check answer 6. A comment in Python language can start with # sign.
a. True b. False
Check answer 7. What would be printed from the following Python expressions:
a. 20+13    b. 12*3    c. 13/4    d. 5.0/3.0
Check answer


Comments

CAPTCHA image



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.