Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the following, write a single (that is, one) Python statement: a. Tell the user to Enter your name, then read in, and

image text in transcribed

For each of the following, write a single (that is, one) Python statement: a. Tell the user to "Enter your name", then read in, and assign to a variable, a string typed in by the user b. Tell the user to "Enter your age", then read in, and assign to a variable, an integer typed in by the user c. Print out, on separate lines, "Your name is varl" and "Your age is var2", where varl and var2 are the values of the two variables entered above d. Print out the first character (only) in the string variable sl e. Print out the last value (only) in the list variable s2 f. Create, and save in a variable, a list of all the characters in the string variable s3 g. Create, and save in a variable, a new list containing all but the first and last values in the list variable s4 h. Create, and save in variable list2, a copy of the list variable listi i. Set the variable mid to the middle value (neither the max nor the min) of the three integer variables x, y, and z j. List variable listl is a list of integers. Set variable list2 to contain all the positive integers in listi Don't forget to write the question letter in your

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

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions