Name: Date: Period: ***CS 1 TEST: Part 2 *** Directions: You should edit this text file by neatly pasting your responses after each question. You have the entire class period to complete the following test. You may use your computer, the Internet, and anything else you have on the computer. You may NOT receive aid from others or their computers. Please show ALL work for partial credit in case your answer is incorrect. When you are done with the test, please print it out and place it on Mr. Bui's desk. 1) Write a statement that displays the following on the screen: Go Generals! 2) Given the following lines of code: x = 1 y = 2 z = x / y What would you change to prevent integer division? Please rewrite or mark the lines of code above. 3) Define a function named GiveMe5OfThese(x) that accepts one parameter and prints the x parameter 5 times: 4) Write a statement that compares two variables: x and y to see if they are not equal. You must use the not-equals comparison operator. If they are not equal, then print out "x and y are not equal!" otherwise, print out "x and y are equal" 5) Write a function named isNotEven(n) that takes one parameter. The function should return True if the parameter is NOT even and return False if the number is even. 6) Write a program that prints out all the numbers from -15 up through 50. 7) Prompt the user for a number and store it in a variable N. Write a loop that prints out the first N terms of the following sequence (N=6 is shown below): 0 3 6 9 12 15 8) Write any infinite loop that prints out "WLCS r0x0rs" forever. 9) Write a loop that counts from 100 through 200 and prints only the numbers that are divisible by 7. 10) Given the following code: print "Welcome to Mr. Bui's Lame Menu" print print "a) Choice A" print "b) Choice B" print "c) Choice C" # Complete the program by prompting the user for a choice. # Check what the user's choice is, and output "You have chosen Choice X" # where X is the user's choice. # Also, if the user did not enter a valid choise, then output "Invalid Choice!"