Our Services

Get 15% Discount on your First Order

[rank_math_breadcrumb]

Quiz in 20 minutes: 1) hich of the following will be output by the following code? word = ‘more’ index = 0 while index < len(word): print(word[index]) index = index + 1 a- o r e b- m o r c

Quiz in 20 minutes:

1) hich of the following will be output by the following code? 

word = ‘more’index = 0while index < len(word):    print(word[index])    index = index + 1

a- ore

b- mor

c- more

d- It would generate an IndexError

2) hat would be output by the following statements?

color1 = ‘RED’color2 = ‘orange’print(color1.lower().startswith(‘R’), color2.upper().startswith(‘O’))

a- False False

b- True False

c- False True

d- True True

3) Which of the following is the correct program to count the number of occurrences of the letter l in the string ‘yellow’?

a- color=”yellow”count = 0for ‘l’ in color:    count = count + 1print(count)

b- color=”yellow”count = 0for letter in color:    if letter == ‘l’:        count = count + 1print(count)

c- color=”yellow”count = 0for letter l in color:    if l == ‘l’:        count = count + 1print(count)

d- color=”yellow”count = 0for letter in color:    if color[i] == ‘l’:        count = count + 1print(count)

4) What would be output by the following statements?

city = ‘new york’print(‘New’ in city, ‘York’ in city)

a- False True

b- True True

c- True False

d- False False

5) What would be output by the following statements?

word = ‘welcome’print(word[:6])

a- e

b- welcome

c- me

d- welcom

6) Which of the following conditions checks whether the variables alpha, beta and gamma, which contain strings, are in alphabetic order?

a- alpha < beta < gamma

b- not(alpha < beta or beta < gamma)

c- alpha in beta and beta in gamma

d- alpha < beta or beta < gamma

7) Which of the following would be output by this code?

word = ‘string’print(word[-2])

a- s

b- t

c- It would generate an IndexError

d- n

8) Assuming the variable animal initially contains the string ‘rat’, which of the following is the correct way to change animal to become ‘cat’?

a- animal[0] = ‘c’

b- animal=”c” + animal[0:]

c- animal[1] = ‘c’

d- animal=”c” + animal[1:]

9) Which of the following will be output by this program?

word = ‘ladder’count = 0for letter in word:    if letter >= ‘a’:        count = count + 1print(count)

a- 5

b- 2

c- 4

d- 6

10) Which of the following is the correct sequence of statements to output the string ‘aONE’ after changing the first letter to upper case and the remaining letters to lower case?

a- perfect=”aONE”print(perfect.capitalize().lower())

b- erfect=”aONE”print(perfect.lower(1).upper(2, 3))

c- perfect=”aONE”print(perfect.capitalize())

d- perfect=”aONE”print(perfect.togglecase())

Share This Post

Email
WhatsApp
Facebook
Twitter
LinkedIn
Pinterest
Reddit

Order a Similar Paper and get 15% Discount on your First Order

Related Questions

Excel 365/2021 Capstone – Level 2 Working with Sales Data These instructions are compatible with both Microsoft Windows and Mac operating systems. In this project, you will work with sales data from T

Excel 365/2021 Capstone – Level 2 Working with Sales Data These instructions are compatible with both Microsoft Windows and Mac operating systems. In this project, you will work with sales data from Top’t Corn, a popcorn company with an online store, multiple food trucks, and two retail stores. You will

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges fro

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 8 challenges from the following list: Interns & HR on the Domain Controller Help Desk Fun: User Workstation Nightmares Dangerous Drives Preventative Protection: Thwarting the Imminent Threat Security

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Please read the instrutions carefully before you accept the order. This labs should be done on xp cyber range websi

Hello Students, As discussed in class, the Workspaces and Challenges are now active. Please read the instrutions carefully before you accept the order. This labs should be done on xp cyber range website. It has to submit minimum 10 challenges with proper documentation. The questions and the website protal is attached below. A Database

Individual Assignment 3 (50 Points) Case Problem 1 (Slate & Pencil Tutoring – pages: HTML 269 – HTML 270) Data files are provided to you with this assignment in a zipped folder. Unzip the folder

Individual Assignment 3 (50 Points)Case Problem 1 (Slate & Pencil Tutoring – pages: HTML 269 – HTML 270) Data files are provided to you with this assignment in a zipped folder. Unzip the folder tosee the data files needed for this case problem.Follow the instructions (Steps 1-16) and complete the

Please read the instructions below carefully. Required Challenges for Full Credit Vulnerability Scan Complete, Begin System Hardening [NG]Volatile Vulnerabilities [NG]The Network is Down! Internal Iss

Please read the instructions below carefully. Required Challenges for Full Credit Vulnerability Scan Complete, Begin System Hardening [NG] Volatile Vulnerabilities [NG] The Network is Down! Internal Issues Edition [NG] The Network is Down! Contractor Edition [NG] (Complexity 1) The Network is Down! Contractor Edition [NG] Systems Security Analyst Crash Course

Hello Students, Please pay attention to the instructions below. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges from the following list:

Hello Students, Please pay attention to the instructions below. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges from the following list: Interns & HR on the Domain Controller Help Desk Fun: User Workstation Nightmares Dangerous Drives Preventative Protection: Thwarting the Imminent Threat Security

Hello This is XP Cyberrange Challenges twe need to complete the challenge by reading a conversaation between the people dicussing on cyber topics. We need to resolve the issues by working on each task

Hello This is XP Cyberrange Challenges we need to complete the challenge by reading a conversaation between the people dicussing on cyber topics. We need to resolve the issues by working on each task which are discussed in that conversation meet. Please pay attention to the instructions below. Finish the

● NCP- NICE Challenge Project ● VM- Virtual Machine ● VMRC- Virtual Machine Remote Console ❖ NICE Framework- This is shorthand for the NICE Cybersecurity Workforce Framework. ❖ Webportal- The web appl

Hello friends this is the step by step guidance to work on task these are not the questions don’t be panic ./ ● NCP- NICE Challenge Project ● VM- Virtual Machine ● VMRC- Virtual Machine Remote Console ❖ NICE Framework- This is shorthand for the NICE Cybersecurity Workforce Framework. ❖

Course : Analyzing and Visualizing Data Textbook Used: Title: Data VisualisationISBN: 9781526468925Authors: Andy KirkPublisher: SAGE Publications LimitedPublication Date: 2019-10-07Edition: 2nd ED.

Course : Analyzing and Visualizing Data Textbook Used: Title: Data VisualisationISBN: 9781526468925Authors: Andy KirkPublisher: SAGE Publications LimitedPublication Date: 2019-10-07Edition: 2nd ED. Practical Connection Assignment At UC, it is a priority that students are provided with strong educational programs and courses that allow them to be servant-leaders in their disciplines and communities, linking research with practice and

Hello Students, As discussed in class, the Workspaces and Challengesare now active. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges from

Hello Students, As discussed in class, the Workspaces and Challengesare now active. Required Challenges for Full Credit To earn full credit (30% of the assignment), you must complete 6 challenges from the following list: Interns & HR on the Domain Controller Help Desk Fun: User Workstation Nightmares Dangerous Drives Preventative Protection: Thwarting the Imminent Threat Security

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least th

Part 1Title: Computer Hardware Using bullet points, briefly describe a computing device you use often, such as your desktop, laptop, tablet, or smartphone. Identify the make and model, and at least three other components of the computing device. In the speaker notes, discuss in detail what you use the device