Home /
Expert Answers /
Computer Science /
in-python-nbsp-q2-basic-data-structures-implement-the-following-lines-of-pseudocode-in-python-using-pa861
(Solved): in python Q2 Basic Data-Structures Implement the following lines of pseudocode in Python using ...
in python
Q2 Basic Data-Structures Implement the following lines of pseudocode in Python using basic data-structures syntax. This tests your understanding of: - Loops - Data-Structures [ ] \# create a list called "nums1" that contains the numbers 1 through 10 \# print out the first number in this list \# print out the last number in this list \# create a list called "nums2" that contains the numbers 5 through 15 \# convert "nums1" to a set and cal1 it "set1" \# convert "nums2" to a set and call it "set2" \# get the intersection of nums1 and nums2 and assign it to a variable called "inter \# print out "intersect"
\# create a list called "nums 1 " that contains the numbers 1 through 10 \# print out the first number in this list \# print out the last number in this list \# create a list called "nums2" that contains the numbers 5 through 15 \# convert "nums1" to a set and cal1 it "set1" \# convert: "nums2" to a set and ca11 it "setz" " get the intersection of nums1 and nums2 and assign it to a variable called "intersect" 4. print out "intersect" H notice the dictionary below prices = \{"2022 Hyundal Sonata": 24,000, "2022. Toyota RAVA"; 32,900, "2022 Ford Explorer"; 35_609\} * print out the price of a "2022. Hyundal Sonata" using the dictionary If add the following key-value pair to the "prices" dictionary without recreating the dictionary \# "2022. Toyota Camry" : 27 . 600