SlideShare a Scribd company logo
1 of 1
Download to read offline
Problem 6 Why cannot the following Python script execute and how to make this script
runnable? [5 pts] profit = 1000.55 > print(' $ ' + profit) Traceback (most recent call last): File " ",
line 1 , 1 n < module > TypeError: cannot concatenate 'str' and 'float' objects Problem 7 1 count =
1 2 while count <= 20 : 3 print (count, end = " , ") 4 count + = 1 (1) What is the equivalent
version of 'for loop' of the above 'while loop'? [5 pts] (2) What is the equivalent version of 'while
True loop with the break statement' of the above 'while loop'? [5 pts]

More Related Content

More from arbtimescentre

PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdf
PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdfPROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdf
PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdfarbtimescentre
 
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdf
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdfProkaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdf
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdfarbtimescentre
 
Project 6- Design and implement a concordance program- that stores a l.pdf
Project 6- Design and implement a concordance program- that stores a l.pdfProject 6- Design and implement a concordance program- that stores a l.pdf
Project 6- Design and implement a concordance program- that stores a l.pdfarbtimescentre
 
Project 2- Generate a computerized telephone directory for a cellular.pdf
Project 2- Generate a computerized telephone directory for a cellular.pdfProject 2- Generate a computerized telephone directory for a cellular.pdf
Project 2- Generate a computerized telephone directory for a cellular.pdfarbtimescentre
 
Programming Exercises- a) Given a struct called Computer with followin.pdf
Programming Exercises- a) Given a struct called Computer with followin.pdfProgramming Exercises- a) Given a struct called Computer with followin.pdf
Programming Exercises- a) Given a struct called Computer with followin.pdfarbtimescentre
 
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdf
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdfProgram Coding (C Programming) for Turning Machine 1) Write coding in.pdf
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdfarbtimescentre
 
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdf
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdfProfilo Co- has the following assets and liabilities- Assets- cash- $1.pdf
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdfarbtimescentre
 
Process Name- International Student Admission Process(George Brown Col.pdf
Process Name- International Student Admission Process(George Brown Col.pdfProcess Name- International Student Admission Process(George Brown Col.pdf
Process Name- International Student Admission Process(George Brown Col.pdfarbtimescentre
 
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdf
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdfProblems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdf
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdfarbtimescentre
 
Process capability Part 2 A-exists when CPK is less than 1-0- B- m.pdf
Process capability Part 2   A-exists when CPK is less than 1-0-   B- m.pdfProcess capability Part 2   A-exists when CPK is less than 1-0-   B- m.pdf
Process capability Part 2 A-exists when CPK is less than 1-0- B- m.pdfarbtimescentre
 
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdf
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdfProblems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdf
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdfarbtimescentre
 
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdf
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdfProblems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdf
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdfarbtimescentre
 
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdf
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdfProblem 7) The number of buses that arrive at a bus stop in T minutes.pdf
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdfarbtimescentre
 
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdf
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdfPROBLEM 7 A random sample of size 35 is taken from a population of 100.pdf
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdfarbtimescentre
 
Problem 21 (continuity of probability) For any sequence of events A1-A.pdf
Problem 21 (continuity of probability) For any sequence of events A1-A.pdfProblem 21 (continuity of probability) For any sequence of events A1-A.pdf
Problem 21 (continuity of probability) For any sequence of events A1-A.pdfarbtimescentre
 
Problem 2- The balanced growth path Consider a Solow economy that is o.pdf
Problem 2- The balanced growth path Consider a Solow economy that is o.pdfProblem 2- The balanced growth path Consider a Solow economy that is o.pdf
Problem 2- The balanced growth path Consider a Solow economy that is o.pdfarbtimescentre
 
Problem 2- Given a list of n elements with each element between 1 and (1).pdf
Problem 2- Given a list of n elements with each element between 1 and (1).pdfProblem 2- Given a list of n elements with each element between 1 and (1).pdf
Problem 2- Given a list of n elements with each element between 1 and (1).pdfarbtimescentre
 
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdf
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdfProblem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdf
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdfarbtimescentre
 
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdf
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdfProblem 4- There are 6 balls in a box- each labeled with a single digi.pdf
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdfarbtimescentre
 
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdf
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdfProblem 2- (10 points) Run BFS and DFS on the graph below (start from.pdf
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdfarbtimescentre
 

More from arbtimescentre (20)

PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdf
PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdfPROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdf
PROMPT (to be written in C)- This exercise has 2 parts- In each case y.pdf
 
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdf
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdfProkaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdf
Prokaryotes use a single type of RNA polymerase to transcribe mRNA- tR.pdf
 
Project 6- Design and implement a concordance program- that stores a l.pdf
Project 6- Design and implement a concordance program- that stores a l.pdfProject 6- Design and implement a concordance program- that stores a l.pdf
Project 6- Design and implement a concordance program- that stores a l.pdf
 
Project 2- Generate a computerized telephone directory for a cellular.pdf
Project 2- Generate a computerized telephone directory for a cellular.pdfProject 2- Generate a computerized telephone directory for a cellular.pdf
Project 2- Generate a computerized telephone directory for a cellular.pdf
 
Programming Exercises- a) Given a struct called Computer with followin.pdf
Programming Exercises- a) Given a struct called Computer with followin.pdfProgramming Exercises- a) Given a struct called Computer with followin.pdf
Programming Exercises- a) Given a struct called Computer with followin.pdf
 
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdf
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdfProgram Coding (C Programming) for Turning Machine 1) Write coding in.pdf
Program Coding (C Programming) for Turning Machine 1) Write coding in.pdf
 
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdf
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdfProfilo Co- has the following assets and liabilities- Assets- cash- $1.pdf
Profilo Co- has the following assets and liabilities- Assets- cash- $1.pdf
 
Process Name- International Student Admission Process(George Brown Col.pdf
Process Name- International Student Admission Process(George Brown Col.pdfProcess Name- International Student Admission Process(George Brown Col.pdf
Process Name- International Student Admission Process(George Brown Col.pdf
 
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdf
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdfProblems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdf
Problems 1 and 2 Suppose that Alice's public RSA key and scheme is giv.pdf
 
Process capability Part 2 A-exists when CPK is less than 1-0- B- m.pdf
Process capability Part 2   A-exists when CPK is less than 1-0-   B- m.pdfProcess capability Part 2   A-exists when CPK is less than 1-0-   B- m.pdf
Process capability Part 2 A-exists when CPK is less than 1-0- B- m.pdf
 
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdf
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdfProblems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdf
Problems 7 and 8 Let X be a discrete random variable on {0-1}- Find th.pdf
 
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdf
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdfProblems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdf
Problems (1 pt) PUT GENOTYPES HERE Having dimples is a dominant trait.pdf
 
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdf
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdfProblem 7) The number of buses that arrive at a bus stop in T minutes.pdf
Problem 7) The number of buses that arrive at a bus stop in T minutes.pdf
 
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdf
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdfPROBLEM 7 A random sample of size 35 is taken from a population of 100.pdf
PROBLEM 7 A random sample of size 35 is taken from a population of 100.pdf
 
Problem 21 (continuity of probability) For any sequence of events A1-A.pdf
Problem 21 (continuity of probability) For any sequence of events A1-A.pdfProblem 21 (continuity of probability) For any sequence of events A1-A.pdf
Problem 21 (continuity of probability) For any sequence of events A1-A.pdf
 
Problem 2- The balanced growth path Consider a Solow economy that is o.pdf
Problem 2- The balanced growth path Consider a Solow economy that is o.pdfProblem 2- The balanced growth path Consider a Solow economy that is o.pdf
Problem 2- The balanced growth path Consider a Solow economy that is o.pdf
 
Problem 2- Given a list of n elements with each element between 1 and (1).pdf
Problem 2- Given a list of n elements with each element between 1 and (1).pdfProblem 2- Given a list of n elements with each element between 1 and (1).pdf
Problem 2- Given a list of n elements with each element between 1 and (1).pdf
 
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdf
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdfProblem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdf
Problem 2 - Print all odd numbers from n1 to 2 using the -for loop-- t.pdf
 
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdf
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdfProblem 4- There are 6 balls in a box- each labeled with a single digi.pdf
Problem 4- There are 6 balls in a box- each labeled with a single digi.pdf
 
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdf
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdfProblem 2- (10 points) Run BFS and DFS on the graph below (start from.pdf
Problem 2- (10 points) Run BFS and DFS on the graph below (start from.pdf
 

Recently uploaded

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 

Recently uploaded (20)

Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 

Problem 6 Why cannot the following Python script execute and how to ma.pdf

  • 1. Problem 6 Why cannot the following Python script execute and how to make this script runnable? [5 pts] profit = 1000.55 > print(' $ ' + profit) Traceback (most recent call last): File " ", line 1 , 1 n < module > TypeError: cannot concatenate 'str' and 'float' objects Problem 7 1 count = 1 2 while count <= 20 : 3 print (count, end = " , ") 4 count + = 1 (1) What is the equivalent version of 'for loop' of the above 'while loop'? [5 pts] (2) What is the equivalent version of 'while True loop with the break statement' of the above 'while loop'? [5 pts]