Question

Using JES/Jython Function Name: approachAllAngles() Parameters: Sides- integer of how many sides the shape has Using...

Using JES/Jython

Function Name: approachAllAngles()

Parameters: Sides- integer of how many sides the shape has

Using the formula, D = ((Number of sides - 2) * 180) / Number of

sides write a function that takes in the number of sides in your polygon and prints a

sentence containing the angle measurements and the number of sides in the polygon.

Test Cases:

>>>approachAllAngles(4)

Each angle in a regular polygon with 4 sides measures 90 degrees.

>>>approachAllAngles(9)

Each angle in a regular polygon with 9 sides measures 140 degrees.

Homework Answers

Answer #1

def approachAllAngles(sides):
# Calculate angle and print result
D = ((sides-2)*180)/sides
print "Each angle in a regular polygon with",sides,"sides measures",D,"degrees."
return

approachAllAngles(4)
approachAllAngles(9)

SCREENSHOT-

OUTPUT -


Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Using JES/Jython Function Name: sortMusic() Parameters: Name -string of artist’s name Write a function that finds...
Using JES/Jython Function Name: sortMusic() Parameters: Name -string of artist’s name Write a function that finds the first letter of an artist’s name. Test Cases: >>>sortMusic(“Lizzo”) Lizzo starts with the letter L. >>>sortMusic(“Khalid”) Khalid starts with the letter K.
Using C programming Create a function called printMenu( ) with the following properties: Has no function...
Using C programming Create a function called printMenu( ) with the following properties: Has no function inputs or output. Prints the following menu to the screen: 1. Enter user name. 2. Enter scores. 3. Display average score. 4. Display summary. 5. Quit Create a function called printLine( ) with the following properties: Takes as input a char Takes as input an integer corresponding to the number of times to print the character Has no function output. For example, if we...
def processString(string): # Implement this function # This should print 4.5 3.0 processString("An example. Two") #...
def processString(string): # Implement this function # This should print 4.5 3.0 processString("An example. Two") # This should print 4.4 5.3 4.5 processString("This is the first sentence. The second sentence starts after the period. Then a final sentence") This function takes in a string as a parameter and prints the average number of characters per word in each sentence in the string. Print the average character count per word for each sentence with 1 decimal precision(see test cases below).-Assume a...
Write a function in c using #include <stdio.h> that takes a one-dimensional integer array and returns...
Write a function in c using #include <stdio.h> that takes a one-dimensional integer array and returns the index of the first occurance of the smallest value in the array. Your function must be able to process all the elements in the array. Create a function prototype and function definition (after the main function). Your main function should declare a 100 element integer array. Prompt the user for the number of integers to enter and then prompt the user for each...
Implement the following functions in the given code: def random_suit_number(): def get_card_suit_string_from_number(n): def random_value_number(): def get_card_value_string_from_number(n):...
Implement the following functions in the given code: def random_suit_number(): def get_card_suit_string_from_number(n): def random_value_number(): def get_card_value_string_from_number(n): def is_leap_year(year): def get_letter_grade_version_1(x): def get_letter_grade_version_2(x): def get_letter_grade_version_3(x): Pay careful attention to the three different versions of the number-grade-to-letter-grade functions. Their behaviors are subtly different. Use the function descriptions provided in the code to replace the pass keyword with the necessary code. Remember: Parameters contain values that are passed in by the caller. You will need to make use of the parameters that each...
**please write code with function definition taking in input and use given variable names** for e.g....
**please write code with function definition taking in input and use given variable names** for e.g. List matchNames(List inputNames, List secRecords) Java or Python Please Note:    * The function is expected to return a STRING_ARRAY.      * The function accepts following parameters:      *  1. STRING_ARRAY inputNames      *  2. STRING_ARRAY secRecords      */ Problem Statement Introduction Imagine you are helping the Security Exchange Commission (SEC) respond to anonymous tips. One of the biggest problems the team faces is handling the transcription of the companies reported...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following commands do: dd, y3, p, :set cindent (1 pt) VIM exercises These exercises on the computer need to be repeated by each student in the pair. This is to ensure that both students understand how to get around in Linux!!! For this part of the lab, you will create a .vimrc file that will help you develop your C++ programs using VIM. First, we...
You will write a program that loops until the user selects 0 to exit. In the...
You will write a program that loops until the user selects 0 to exit. In the loop the user interactively selects a menu choice to compress or decompress a file. There are three menu options: Option 0: allows the user to exit the program. Option 1: allows the user to compress the specified input file and store the result in an output file. Option 2: allows the user to decompress the specified input file and store the result in an...
11.12 LAB*: Program: Online shopping cart (continued) This program extends the earlier "Online shopping cart" program....
11.12 LAB*: Program: Online shopping cart (continued) This program extends the earlier "Online shopping cart" program. (Consider first saving your earlier program). (1) Extend the ItemToPurchase class to contain a new attribute. (2 pts) item_description (string) - Set to "none" in default constructor Implement the following method for the ItemToPurchase class. print_item_description() - Prints item_description attribute for an ItemToPurchase object. Has an ItemToPurchase parameter. Ex. of print_item_description() output: Bottled Water: Deer Park, 12 oz. (2) Build the ShoppingCart class with...
Match terms to their definitions. Write the corresponding letters on the blanks. Not all terms will...
Match terms to their definitions. Write the corresponding letters on the blanks. Not all terms will be used. 1. the best appearing side of a piece of wood or the side that is exposed when installed a. backing b. eased edge 2. a wall finish applied partway up the wall from the floor c. face 3. a building product made by compressing wood fibers into sheet form d. gypsum board 4. an edge of lumber whose sharp corners have been...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT