Question: Task 3: Programming Variables Submit a python script file, task3.1.py, that contains Python code to do the following: i You can print the variables after



Task 3: Programming Variables Submit a python script file, task3.1.py, that contains Python code to do the following: i You can print the variables after assigning them to check your work. It is okay to submit your answer with the print() function calls included. 1. Assign the integer 19 to the variable a. 2. Assign the float 2.718 to the variable b. 3. Assign the String "33" to the variable c. 4. Assign the boolean True to the variable d. 5. Reassign the variable a to the value 38. 6. Convert c to an integer and assign it to variable e. Simple Algorithm Submit a python script file, task3.2.py, that contains Python code to do the following: You must use your variables inside of the print statement! 1. Assign the string "Kevin" to the variable kscrivs. 2. Assign your first name as a string to the variable me. 3. Write a single print statement to print a greeting. For instance, if your first name is Jennifernia, output: Hi Kevin! I'm Jennifernia.. What's the Difference? Submit a python script file, task3.3.py, that contains Python code to do the following: 1. Assign an integer to x1. 2. Assign an integer to x2. 3. Compute the difference and assign it to diff. 4. Output diff. What's your Function? Use the following code as a starter pack for task3.4.py : # Write your "difference" function here # Make sure you use the keyword return to return a value # Write your "slope" function here # Slope is defined as the difference in Y values divided by the # difference in X values. # Make sure you use the keyword return to return a value x1 = int(input("Enter x1: ")) x2 = int(input("Enter x2: ")) y1 = int(input("Enter y1: ")) y2 int(input("Enter y2: ")) diffx = difference(x1, x2) diffy = difference(y1, y2) m = slope(diffx, diffy) print("Slope: + str(m))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
