Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 1 for i in range (1): for j in range (1) print(i, j, end = ) Hint: endsuppresses the endline character of the print
Question 1 for i in range (1): for j in range (1) print(i, j, end = "") Hint: end"suppresses the endline character of the print statement b) no output d) 1 1 e) none of the above Question 2 m2Date = '217-03-27' freq = -1 position = while freq != 1: x m2Date[position] freq m2Date.count (x) positionint(freq) print (position) a) c) 2 d) TypeError: string indices must be integers e) none of the above Question 3 s = ' Newark' print(s:-3]) a) TypeError slice indices must be integers b) the empty string c) New d) Newa e) none of the above Question 4 def vehicleSound (vehicle, sound) for letter in vehicle: if letter not in sound: return False return True print (vehicleSound ('car', 'beep')) a) False b) True c) False False False d) False False False True e) none of the above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started