Question: 1. 2. 3. 4. Q1 Looping through strings 1 Point Consider the following loop: for c in hello: print(R1) What should Ri be REPLACED with

1.

1. 2. 3. 4. Q1 Looping through strings 1 Point Consider the

2.

following loop: for c in "hello": print(R1) What should Ri be REPLACED

3.

with in order to produce the output below? * H * *

4.

E * * L * * L * * O * IMPORTANT:

Q1 Looping through strings 1 Point Consider the following loop: for c in "hello": print(R1) What should Ri be REPLACED with in order to produce the output below? * H * * E * * L * * L * * O * IMPORTANT: Use single quotes where necessary and no spaces in your answer. Enter your answer here Q2 Range and string functions 3 Points Consider the following code: for i in range (R1): x = chr(R2('a') + i) print(x) What should R1 and R2 be REPLACED with in order to produce the following output? a b Q2.1 1 Point R1: Enter your answer here Q2.2 1 Point R2: Enter your answer here Q2.3 1 Point What is the value of i in the first iteration (i.e. the first time in the loop)? Enter your answer here Q3.1 1 Point Fill in the blank: = input( 'Please type a message: ') print("You typed", x) Enter your answer here Q3.2 1 Point In the above code from Question 3.1, what is x? a message a command a variable Q4 Unix 4 Points Consider the following shell commands and their output: $ ls progl.py prog2.py prog3.py $ R1 $ ls hw progl.py prog2.py prog3.py Q4.1 2 Points What should Ri be REPLACED with in order to produce the last line of output? Enter your answer here Q4.2 2 Points What is the command for changing the current directory to hw? IMPORTANT: Use single spaces where necessary Enter your answer here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!