Solution 1:-
Correct answer - 4
The value of x is 4 as then zodiac[0:4] as it will slice upto index 3 of the list and first_group will contain items from cow to dragon.
Solution 2:-
Correct answer - 7
The value of y is 7 as then zodiac[4:7] as it will slice upto index 6 of the list and second_group will contain items from snake to sheep.
Solution 3:-
Correct answer - 13
The value of z is 13 as then zodiac[7:13] as it will slice upto index 12 of the list and third_group will contain items from monkey to rat.
Solution 4:-
Correct answer - 0
The value of i is 0 as there is matching done of the elements in animals list and the zodaic list so only first four elements will be matched and will be poped and then inserted.
Solution 5:-
Correct answer - 0
The value of j is 0 as there is matching done of the elements in animals list and the zodaic list so the elements poped are inserted in the manner as element inserted at the top of stack. So the desired output will be produced as stated in the problem statement.
use python IDEL Please highlight the answer Problem 1 Lists. Read the following code and answer...
This should be in PHP, please For Project 1, you need to create a Web form to present a ten (5) Multiple Choice quiz about the Chinese zodiac signs. Indicate that all of the questions must be answered for the quiz to be graded. You can use radio buttons or drop-down boxes Multiple Choice answers. Requirements for Project 1: Provide fields for visitors to enter their name and answers to the questions Notify the visitor that the fields are required...
use python IDEL Please highlight the answer Problem 2 Dictionary. Read the following code and answer the next five questions about it. book1 = ("Alice":"arts", "Bob": "botany" "Clara": "chemistry", "Dasha": "digital media") book2 = {"Eve": "electronics", "Forest": "finances". "George": "geology", "Harry": "history". "Ivan": "Italian", "Joanna": "Japanese Arts") mybook=0 condition 1 = ? condition2 - ? condition3 = ? for key in book 1.keys(): mybook[key] =book 1.get(key) mybook.update(book 2) #first print statement print (mybook) if condition 1: mybook["Bob"] = "biochemistry" mybook["Eve"]...
use python IDEL Please highlight the answer Problem 3 Files. Read the following code and answer the next five questions about it. The contents of the files list 1.txt and list2.txt are the following (given side by side): list 1. txt content: list2.txt content 2 apples 2 apples 3 oranges 1 loaf of bread 2 eggs 2 eggs 1 cereal box # the program code starts here filename1 = "list 1.txt" filename2 - "list2.txt" filename3 - "listdiff.txt" with open (filename1,"r")...
use python IDEL Please highlight the answer Problem 1 Errors and Exceptions. There are two main types of errors: syntax errors and runtime errors. Syntax errors are detected by the Python interpreter before the program execution during the parsing stage (parsing is a process, during which the Python interpreter analyzes the grammatical structure of the program). Runtime errors are errors in a program that are not detected by the Python interpreter during its parsing stage. They are further divided into...
use python IDEL Please highlight the answer 1 ווCIוסטIT Errors and Exceptions. There are two main types of errors: syntax errors and runtime errors. Syntax errors are detected by the Python interpreter before the program execution during the parsing stage (parsing is a process, during which the Python interpreter analyzes the grammatical structure of the program). Runtime errors are errors in a program that are not detected by the Python interpreter during its parsing stage. They are further divided into...
use python IDEL Please highlight the answer Problem 2 Files. Since almost all data can be stored in files, knowing how to use files in programs is invaluable. Today you will practice with opening a file for reading, writing and editing using the Python interpreter. Do not type messages in red into Python shell Question 14 0.5 pts create a new file mytext.txt for >>>f1 = open("mytest.txt","w+") writing & reading >>>f1.write("hello\n") >>>for i in range(5): f1.write(str(i) + "\n") >>>f1.readlines() record...
PLEASE ANSWER QUESTION 1 & 2. ALSO PLEASE SUBMIT CODE + PDF OF REPORT/ASSIGNMENT Problem1 You are choreographing a circus show with various animals. For one act, you are given two kangaroos on a number line ready to jump in the positive direction (i.e, toward positive infinity). The first kangaroo starts at location z1 and moves at a rate of vl meters per jump. The second kangaroo starts at location z2 and moves at a rate of u2 meters per...
You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...
Please read and answer the following questions. 1. How was the sample selected ? We’re demographics collected ? 2. Is the sample representative of the target population? If not how was the sample “improved “ to make the results more reliable and valid? 3. What is the design of the study? 4. How were the human subjects protected ? 5. Were instruments used reliable and valid ? Did they measure the phenomenon under the study( how do you know that...