Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions