Question: Submit one Python file with the following header then answer the following questions. Your name and Student ID cs126 Introduction to Python Assignment#1 1. What

 Submit one Python file with the following header then answer the

Submit one Python file with the following header then answer the following questions. Your name and Student ID cs126 Introduction to Python Assignment#1 1. What is an Operating System? #comment your answer 2. Write three possible variable names containing at least one number, a letter and an underscore. 3. Write the code lines to find: V1 + V2 4. Print the number of diagonals (lines linking two non-adjacent vertices) in a polygon with n sides. Let n be given as an input. The fomula to use is as follows: number of distinct diagonals = n(n-3) Hint: input() gets strings, need to convert it to a number using int() myy 5. Write a Python program to calculate the slope between two points (X1.71) and (x2.ya) in a 2D plane using the slope formula: 6. Write a Python program to calculate tan(x) using sin(x) and cos(x) funtions provided by the math module. x is the angle given as input. sin tan = COSA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!