File size: 1,344 Bytes
7d2f7d0
 
 
 
 
 
1
2
3
4
5
6
7
{"text": "<s>[INST] What kind of programming language is Python? [/INST] Python is an interpreted, object-oriented, high-level programming language. </s>"}
{"text": "<s>[INST] How do you compile Python programs? [/INST] Python is an interpreted language, and you can run the scripts directly, either using: python hello.py or make your script executable by adding #!/usr/bin/env python to the top of the script, making the file executable with chmod +x hello.py and then running: ./hello.py. You may also try compileall: python -m compileall ./ </s>"}
{"text": "<s>[INST] How are keywords written in the Python programming language? [/INST] In the Python programming language, keywords are typically written in lowercase. For example, `print \"print should be written in lowercase letters\"`. </s>"}
{"text": "<s>[INST] How are local variables to a procedure declared in Python? [/INST] In Python, variables local to the procedure are declared using the name of the keyword followed by the variable = and then some value. By default, variables are empty strings. For instance, `mode=''`. </s>"}
{"text": "<s>[INST] Write a comment in the Python programming language. [/INST] # i am a comment </s>"}
{"text": "<s>[INST] Write a hello world program in the Python programming language. [/INST] #!/usr/bin/env python \n print('hello world)' </s>"}