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 answer.
没有找到相关结果