Question


47. (2 points) What will the following code print? my-list-onn) for n in range( 5) İf(n.nr%2--ol print(my_list) Answer Assume that the variable data refers to the list [5, 3, 7). Write the value of the following expressions for questions 48-49. 48. (1 points) datal-11 Answer: 49. (1 points) 0 in data Answer: 50. (4 points) Given my_dict my_dict la:3, x:7, r:5, write Python code to print all the key and value pairs of Answer:
0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
47. (2 points) What will the following code print? my-list-on"n) for n in range( 5) İf(n.nr%2--ol...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • pls help python is to be used Assume that the variable data refers to the list...

    pls help python is to be used Assume that the variable data refers to the list [5, 3, 7]. Write the value of the following expressions for questions 48-49. 48. (I points) datal-1] Answer: 49. (1 points) 0 in data Answer: 50. (4 points) Given my_dict = {'a':3, 'x':7, 'r':5}, write Python code to print all the key and value pairs of my_dict. Answer:

  • Python homework Write a function called insert_value(my_list, value, insert_position) that takes a list, a value and...

    Python homework Write a function called insert_value(my_list, value, insert_position) that takes a list, a value and an insert_position as parameters. The function returns a copy of the list with the value inserted into the list (my_list) at the index specified by insert_position. Check for the insert_position value exceeding the list (my_list) bounds. if the insert_position is greater than the length of the list, insert the value at the end of the list. if the insert_position is less than or equal...

  • Question 18 CLO3 Analyze the following code and answer the questions that follow def F(n): If n <= 1: return n else: return F(n-1)+F(n-2) for i in range (n) print (F(i)) Result: 0 1 1 2 3 5 8...

    Question 18 CLO3 Analyze the following code and answer the questions that follow def F(n): If n <= 1: return n else: return F(n-1)+F(n-2) for i in range (n) print (F(i)) Result: 0 1 1 2 3 5 8 13 a. Write number of operations as a function when the code is execute b If n 7, what is the total number of operations? c. What is the complexity of the algorithm behind the code? (2 Marks) (2 Marks) (1...

  • Python What do the following loops print? Work out the answer by tracing the code, not...

    Python What do the following loops print? Work out the answer by tracing the code, not by using the computer. a. s = 2 for n in range (1, 6): s = s + n print(s) b. s = 1 for n in range (1, 11): n = n + 2 s = s + n print(s) c. S = 1 for in range (1, 6) s = s + n n = n + 1 print(s, n) Rewrite the...

  • Complete function long_list_printer.print_list(). When it's finished, it should be able to print this list, a =...

    Complete function long_list_printer.print_list(). When it's finished, it should be able to print this list, a = [ [93, 80, 99, 72, 86, 84, 85, 41, 69, 31], [15, 37, 58, 59, 98, 40, 63, 84, 87, 15], [48, 50, 43, 68, 69, 43, 46, 83, 11, 50], [52, 49, 87, 77, 39, 21, 84, 13, 27, 82], [64, 49, 12, 42, 24, 54, 43, 69, 62, 44], [54, 90, 67, 43, 72, 17, 22, 83, 28, 68], [18, 12, 10,...

  • #1. Operators and values, expressions Please correct the following code to make it print the given...

    #1. Operators and values, expressions Please correct the following code to make it print the given expressions and their answers well (3pts). public class DataTypes {    public static void main(String[] args) {       System.out.println("5*8/6 = " + 5*8/6);       System.out.println("(2*6)+(4*4)+10 = " + (2*6)+(4*4)+10);       System.out.println("6 / 2 + 7 / 3 = " + 6 / 2 + 7 / 3);       System.out.println("6 * 7 % 4 = " + 6 * 7 % 4 );       System.out.println("22 + 4 * 2 = "...

  • Part 2. Algorithms for Big Data Programming (48 points total for this part) [Question 1, 12...

    Part 2. Algorithms for Big Data Programming (48 points total for this part) [Question 1, 12 points total, including 1.1 - 1.3] Suppose our input data to a map-reduce operation consists of integer values (that is, the values are integers, note the keys are not important). The map function takes an integer i and produces the list of pairs (1) such that p is a prime divisor of į. For example, map(12) = [(2,12),(3,12)]. The reduce function is addition. That...

  • 1) Translate the following equation into a Python assignment statement 2) Write Python code that prints...

    1) Translate the following equation into a Python assignment statement 2) Write Python code that prints PLUS, MINUS, O ZERO, depending on the value stored in a variable named N. 3) What is printed by: 3 - 1 while 5: while 10 Print ) Page 1 of 9 4) Write a Python while loop that reads in integers until the user enters a negative number, then prints the sum of the numbers. 1-2 of 9 4) Write a Python while...

  • 5. (2 points) What are the values in array x after the following code executes (list...

    5. (2 points) What are the values in array x after the following code executes (list all of the elements of the array)? CS1113 Introduction to Computer Science Page 2 of 2 double []x 2,-3,4,-5,6,-7 for(int i-1; i < x.length; ++i)

  • for 1. the drop down options are N or n 2. x bar or u 3....

    for 1. the drop down options are N or n 2. x bar or u 3. o or s 9. 1-6 or none 10. positively/ negatively skewed or symmetric 11. IQR or standard deviation Use the following data set to find the sample statistics for the following data set. (Round answers to the nearest hundredth, if necessary. {51, 48, 42, 43, 48, 48, 46, 15, 29, 45, 47, 55, 46, 35, 47, 48, 54, 26, 53, 42) 1. 2. ....

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT