Question: How many times does the following loop display: Enter a name: ? while True: name = input('Tner a name: ') if name == :

How many times does the following loop display: Enter a name: ?

while True:

name = input('Tner a name: ')

if name == "" :

break

print('Hello!')

print('Bye!')

a. One b. Zero or more c. One or more d. Zero

2. Write a recursive function in Python, sum_first(n), that returns the sum of the first n integers, where n can be an integer between 0 and 5000. For example:

sum_first(0) returns 0

sum_first(1) returns 1

sum_first(2) returns 3

sum_first(3)returns 6

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!