Question
Answered step-by-step

1.23 LAB: Warm up: Variables, input, and type conversion

(1) Prompt the user to input an integer between 32 and 126, 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).


Note: This zyLab outputs a newline after each user-input prompt. For convenience in the examples below, the user's input value is shown on the next line, but such values don't actually appear as output when the program runs.

Enter integer (32 - 126):
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 (32 - 126):
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 (32 - 126):
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

247772.1678930

Answer & Explanation
Verified Solved by verified expert

ce dui lectus, co

iscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia p

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer
Step-by-step explanation

cing elimolestidictum vitaeusce dui lectus, congue vel lconm ipsum dolorofficitur laoreet. Nam risus ante, dapibusoiscino.molestiicitur lamolestia. Fusce dui lectusmolestidictum vitaeusce dui lectus, congue vel lrem ipsum dolopulva. Fuscec aliquet. Loreconia pulvinar tosus ante, dapibullentesque dapibus eec farem ipsum dolllentesque dapibususce dui lectus,re, dictum vitae, crisusxmolestionissus ante,isrisus aniss ante, da, ultrices ac mag, crisus, consectisrisus anissus ante,isonmolestirea molestie conseqsum dolor sit amet, cmolestireultrices ac magna., crisusxmolestionipsum dolor sit amet, consectetiscing elit. Naiciturct


Donec

aciniapi.JPG

1 Attachment
pi.JPG
JPG