Prompt the user to input an integer between 0 and 155 a


Warm up: Variables, input, and type conversion (Python 3)

(1) Prompt the user to input an integer between 0 and 155, a float, a character, and a string, storing each into separate variables. Then, output those four values on a single line separated by a space. (Submit for 2 points).

Enter integer (0 - 155): 99
Enter float: 3.77
Enter character: z
Enter string: Howdy
99 3.77 z Howdy

(2) Extend to also output in reverse. (Submit for 1 point, so 3 points total).

Enter integer (0 - 155): 99
Enter float: 3.77
Enter character: z
Enter string: Howdy
99 3.77 z Howdy
Howdy z 3.77 99

(3) Extend to convert the integer to a character by using the 'chr()' function, and output that character. (Submit for 2 points, so 5 points total).

Enter integer (0 - 155): 99
Enter float: 3.77
Enter character: z
Enter string: Howdy
99 3.77 z Howdy
Howdy z 3.77 99
99 converted to a character is c

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Prompt the user to input an integer between 0 and 155 a
Reference No:- TGS02788787

Now Priced at $15 (50% Discount)

Recommended (95%)

Rated (4.7/5)