Question: I need help with phyton Define a function called showAlphabet(). a. This function prints the alphabet in both uppercase and lowercase as follows: A B

I need help with phyton

Define a function called showAlphabet().

a. This function prints the alphabet in both uppercase and lowercase as follows:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

a b c d e f g h i j k l m n o p q r s t u v w x y z

b. For full credits, your function should use all the following python features:

The for loops;

The chr() function;

The sys.stdout.write() function;

The str(x).ljust(2) function;

The ascii code for A is 65;

The asscii code for a is 97.

Define a function called drawTarget(radius).

a. The input to this function is an integer called radius.

b. This function reports the following error of radius is less than 4:

Radius must be at least 4.

c. When radius is at least 4, this function displays a target on the screen. Both the height and the width of the target are (radius*2+1).

The center of this target is at coordinate (radius, radius).

The distance of a pixel is computed as its Euclidean distance from the center.

If a pixel falls in the range of (radius/2.0

(distance

Otherwise, the pixel is displayed as two dots ...

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!