subject

Write a program that asks the user for their name and how many times to print it. If I enter Ada and 3 it should print:

Ada
Ada
Ada

Which loop correctly does this?

name = input("Enter your name: ")
num = int (input("Enter a number: "))

c = 1

while (c > num):
print (name)
c = c + 1

name = input("Enter your name: ")
num = int (input("Enter a number: "))

c = 1

while (c <= num):
print (name)
c = c + 1

name = input("Enter your name: ")
num = int (input("Enter a number: "))

c = 1

while (num <= name):
print (name)
c = c + 1

name = input("Enter your name: ")
num = int (input("Enter a number: "))

c = 1

while (c <= num):
print (name)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 20:40
On nba 2k 19, every time i try to join a my park game, it leads ro a website telling my dad that he needs ps plus. i already have ps plus though. how do i fix this?
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
question
Computers and Technology, 24.06.2019 22:30
The a great imaginary circle, or reference line, around earth that is equally distant from the two poles and divides earth into the northern and southern hemispheres.
Answers: 1
You know the right answer?
Write a program that asks the user for their name and how many times to print it. If I enter Ada an...
Questions
question
Mathematics, 02.03.2021 02:10
question
Mathematics, 02.03.2021 02:10
question
History, 02.03.2021 02:10
question
Mathematics, 02.03.2021 02:10
Questions on the website: 13722362