[go: up one dir, main page]

0% found this document useful (0 votes)
266 views1 page

Intro2py Lab1

This document outlines a first Python lab assignment, providing questions to help students learn about basic Python information like checking the version and using variables, Python syntax like escaping strings and using print functions, and hands-on exercises to create programs that output variables, use the midpoint formula with different inputs, take user input for coordinates, and create a basic countdown loop. Students are instructed to complete the tasks, take screenshots as examples, and submit their work in a Word document with their name and "Lab1" in the subject line of an email to the instructor.

Uploaded by

api-397215105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
266 views1 page

Intro2py Lab1

This document outlines a first Python lab assignment, providing questions to help students learn about basic Python information like checking the version and using variables, Python syntax like escaping strings and using print functions, and hands-on exercises to create programs that output variables, use the midpoint formula with different inputs, take user input for coordinates, and create a basic countdown loop. Students are instructed to complete the tasks, take screenshots as examples, and submit their work in a Word document with their name and "Lab1" in the subject line of an email to the instructor.

Uploaded by

api-397215105
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Lab 1: Basics of Python

This is the first lab in Python! Please read the question/task and input the answer and screenshots to a
word document. Please name the document Intro2Py and email this to the instructor’s email with the
Subject of: Lab1 – Your_Name.

Basic Python Info:

1. How do you check the version of Python in Linux? (Provide an example w/Screenshots)
2. What is the name of the process of inputting a value to a variable?
3. When is a good time to use the Interactive Shell?
4. What was the first program we wrote in Python?

Python Syntax:

5. How do you escape the string to a new line? (Give an example w/Screenshots):
6. What does the print function do in Python?
7. When using the Print Function what is used inside the parenthesis? (Give an example
w/Screenshots):
8. What is an example of good naming convention?
9. In Python create the following Variable w/ their appropriate values and describe the differences:
a. Apple = 10;
b. apple = ‘20’;
10. In Python please use #9 and combine them into one print function. (Provide Examples
w/Screenshots)

Python Hands-on

11. In Python, create a program that outputs the following variables w/ the appropriate values.
(Please in a comment above the variable the data type it is using):
a. Name:
b. Grade:
c. Age:
d. Month of Birth:
e. Favorite Number:
12. Using the Midpoint formula, please recreate the formula in Python with the following inputs
(Provide Examples w/Screenshots):
a. A = (2,4) B = (-4,-4)
b. A = (4,3) B = (3,-4)
c. A = (-4,2) B = (2,-2)
d. A = (-3,-5) B = (3,5)
13. Now change all the user’s input from #12 into int and print them out. . (Provide Examples
w/Screenshots)
14. Utilize the program for #12 and create user’s input for each X and Y coordinates. (Provide
Examples w/Screenshots)
15. In Python create a basic loop that counts down from 10 to 0. (The out need to include 10 and 0)
(Provide code w/Screenshots of output):

You might also like