Question

Which of the following will create a dictionary? att ={} att = {“Jason”: 34, “Joe”:21, “Jimmy”:67}...

  1. Which of the following will create a dictionary?

  1. att ={}
  2. att = {“Jason”: 34, “Joe”:21, “Jimmy”:67}
  3. att = {34: “Jason”, 21:”Joe”, 67:”Jimmy”}
  4. All the above

  1. List are classified as a mutable object.

A. True

B. False

  1. Which of the following does not define a set?

A. s1 = { ‘Jason’, ‘Joe’, ‘Jimmy’}

B. s1 = set([ ‘Jason’, ‘Joe’, ‘Jimmy’])

C. s1 = set(‘Jason, Joe, Jimmy’)

D. s1 = set(‘Jason’, ‘Joe’, ‘Jimmy’)

  1. What is the output of the following script?

name = "Josh Roberts"

print(name[5])

A. ‘ ‘

B. J

C. h

D. R

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)  All the above
2)  True
3)  s1 = set(‘Jason’, ‘Joe’, ‘Jimmy’)
4)  R


Add a comment
Know the answer?
Add Answer to:
Which of the following will create a dictionary? att ={} att = {“Jason”: 34, “Joe”:21, “Jimmy”:67}...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • python code? 1. Create a class called Person that has 4 attributes, the name, the age,...

    python code? 1. Create a class called Person that has 4 attributes, the name, the age, the weight and the height [5 points] 2. Write 3 methods for this class with the following specifications. a. A constructor for the class which initializes the attributes [2.5 points] b. Displays information about the Person (attributes) [2.5 points] c. Takes a parameter Xage and returns true if the age of the person is older than Xage, false otherwise [5 points] 3. Create another...

  • Create a class hierarchy to be used in a university setting. The classes are as follows:...

    Create a class hierarchy to be used in a university setting. The classes are as follows: The base class is Person. The class should have 3 data members: personID (integer), firstName(string), and lastName(string). The class should also have a static data member called nextID which is used to assign an ID number to each object created (personID). All data members must be private. Create the following member functions: o Accessor functions to allow access to first name and last name...

  • Python Programming QUESTION 16 Which of the following is an example of a Keyword in Python?...

    Python Programming QUESTION 16 Which of the following is an example of a Keyword in Python? elif class for All of the above QUESTION 17 Which of the following is not an acceptable variable name in Python? 2ndVar $amount Rich& ard None of the above are acceptable variable names QUESTION 18 The number 1 rule in creating programs is ___________________- Write the code first Think before you program Let the compiler find you syntax errors There are no rules just...

  • PLEASE DO IN JAVA 1) Create interface named “Person” which exposes getter/setter methods for the person’s...

    PLEASE DO IN JAVA 1) Create interface named “Person” which exposes getter/setter methods for the person’s name and college ID: 1. getName 2. setName 3. getID 4. setID. The college ID is represented as “int”. Define two classes, Student and Faculty, which implement Person. Add field GPA to Student and department to faculty. Make them private and create corresponding getters (getGPA, getDepartment) and setters (setGPA, setDepartment). Use appropriate types. 2) Write a class College, which contains the name of the...

  • PYTHON Hello can someone create the following functions? I'm not sure how to start on them....

    PYTHON Hello can someone create the following functions? I'm not sure how to start on them. makeDictionary Define a function named makeDictionary with two parameters. The first argument passed the function must be a list of strings to be used as keys, while the second is a list of the same length containing values (of some type). This function must return a dictionary consisting of the keys paired with the corresponding values. For example, makeDictionary(['apno','value'],['REP-12','450']) must return this dictionary: {'apno':...

  • The attached document is a C++ source code, INTERFACE__Class{aSet}.cpp, which contains an interface for class aSet and an implementation section which is largely left empty, so that students could fill in the missing code, where it is written // C++ code

    /* FILE NAME: Class{aSet}.cpp FUNCTION: A template class for a set in C++. It implements all the set operations, except set compliment:  For any two sets, S1 and S2 and an element, e  A. Operations which result in a new set:  (1) S1 + S2 is the union of S1 and S2 (2) S1 - S2 is the set difference of S1 and S2, S1 - S2 (3) S1 * S2 is the set intersection of S1 and S2, S1 * S2 (4) S1 + e (or e +...

  • C++ HELP! Create a class and name it Payslip. This class should have the following attributes...

    C++ HELP! Create a class and name it Payslip. This class should have the following attributes or properties: name, pay grade, basic salary, overtime hours, overtime pay, gross pay, net pay and withholding tax. Define the accessors and mutators of the Payslip class based on its attributes or properties. This class should also have the following methods: determinePayGradeAndTaxRate and computePay. Create another class and name it Employee. This class will contain the main method. In the main method, instantiate an...

  • 7.13. Consider the following View definition and update statement: CREATE VIEW TOPPRODUCTS(PRODNR,PRODNAME,QUANTITY) AS SELECT PRODNR, PRODNAME,...

    7.13. Consider the following View definition and update statement: CREATE VIEW TOPPRODUCTS(PRODNR,PRODNAME,QUANTITY) AS SELECT PRODNR, PRODNAME, AVAILABLE_QUANTITY FROM PRODUCT WHERE AVAILABLE_QUANTITY>100 WITH CHECK OPTION UPDATE TOPPRODUCTS SET QUANTITY=80 WHERE PRODNR=0153 What will be the result of this? a. The update can be successfully made but only the PRODUCT table will be updated. b. The update can be successfully made and both the View and PRODUCT table will be updated. c. The update will be halted because of the WITH CHECK...

  • Within DrJava, create a class called StudentQuizScores and do the following using a do-while loop. 1....

    Within DrJava, create a class called StudentQuizScores and do the following using a do-while loop. 1. You program will read in a student’s first name. The same will be done for the student’s last name. Your program will use respective methods (described below) to accomplish this. 2. Your program will then read in three quiz scores, respectively. This should be done by using the same method three times. This method is described below. 3. Your program will then calculate the...

  • Unit 1 Programming Assignment Follow the directions for each of the following questions. Answer the question...

    Unit 1 Programming Assignment Follow the directions for each of the following questions. Answer the question or provide the code in a space below the question. 1. Write the complete script tag set for a script whose line statement is document.write(“Hello, world.”); 2. Build a complete HTML document and include the answer to the previous question such that the page executes the script as the page loads. Open the document in your browser to test the results. 3. Add a...

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
ADVERTISEMENT