Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python 3 please Exercise 2. Caesar's Ciphers II Write a function decodeCipher(word, num) that takes a cipher string (of only lower case letters) and a

image text in transcribed

Python 3 please

Exercise 2. Caesar's Ciphers II Write a function decodeCipher(word, num) that takes a cipher string (of only lower case letters) and a number, and returns the decoded string that is created when every character is replaced by its mapping. For example, decodeCipher("cde", 2) should return "abc". Use this function to decode "jbj fpurzr vf terng" given that the letters had been shifted by 13. Exercise 3. Colored polygons. Write a function cpolygon(n, size) that takes in two arguments: n (the number of sides of a polygon), and size (its side length in pixels). The function draws an n-sided polygon with alternating black and red colors. Hint: The function turtle.color(col) changes the color of the pen to col, which is a string specifying the desired color (black, red, etc.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Concepts

Authors: David M Kroenke, David J Auer

6th Edition

0132742926, 978-0132742924

More Books

Students also viewed these Databases questions

Question

6. What kinds of shipping needs are best met by a courier and why?

Answered: 1 week ago