Assign True to the variable has_dups if the string s1 has any duplicate character (that is if any character appears more than once) and False otherwise.Here is the answer I wrote:


i = []
for i in range(len([s1])):
if s1.count(s1[i]) > 1:
has_dups = True
elif s1.count(s1[i]) = 1:
has_dups = False


Here is the message I got from the system:

Solutions with your approach don't usually use: elif



Please Help me to correct it.

Answers

Answer 1
Answer: i dont know the language of the code
probably you have sintacs mistakes in it

has_dups = false
for i in range(len([s1])):
has_dups = has_dups || s1.count(s1[i]) > 1

Related Questions

An analyst receives an alert from the SIEM showing an IP address that does not belong to the assigned network can be seen sending packets to the wrong gateway. Which of the following network devices is misconfigured and which of the following should be done to remediate the issue? A. Firewall; implement an ACL on the interface B. Router; place the correct subnet on the interface C. Switch; modify the access port to trunk port D. Proxy; add the correct transparent interface
Shortest Remaining Time First is the best preemptive scheduling algorithm that can be implemented in an Operating System. a. True b. False
Use the AND function with appropriate arguments in cell H11 to determine if there is a force out at third base. There is a force out at third base if "Runner on 1st" and "Runner on 2nd" are both "Yes".
what are "open source" programming language? Give examples of open source languages. Discuss the pros and cons of open source language.
Checkpoint 10.43 Write an interface named Nameable that specifies the following methods: _______{ public void setName(String n) public String getName()} Fill in the blank.

Should I get hollow knight, hyper light drifter, Celeste, or stardew valley for switch

Answers

Ooh, very tough question. I've played both Celeste, and Hollow knight. So I cant say anything for the other two games.

Celeste and Hollow Knight are both platforming games, so that was something I was interested in. And both also have deep morals to learn and stories to enjoy. Celeste basically follows Madeline, who's had some emotional problems in the past as she's trying to climb a mountain. In this mountain, a part of her escapes and becomes a but of a antag.

I loved the background, and the characters in this game. But there were a lot of parts in the game that frustrated me and I got very close to just all-out giving up on the game. I still loved it though.

But don't even get me started on Hollow Knight. LIKE OH My GOD, I am obsessed with Hollow Knight and its beauty! I have almost every piece of merchandise, every plush, every t-shirt, charm, sticker, pins, and all the DLC packs. This game is an absolute masterpiece. I cant say anything without giving off the background and lore behind the game. and I'll be honest, there's been a couple of times where I was so touched with the game, that I just started crying. There's lovable characters like Hornet, our little Ghost, Myla (oml rip Myla you beautiful baby), and of course laughable Zote. Its so beautiful. The art is stunning, the animation is so clean. And if you do end up getting Hollow Knight, then your going to be even more excited because Team Cherry is actually in the works of creating the sequel (or prequel) of Hollow Knight, which is Hollow Knight ; Silksong! Definitely go and watch the Nintendo trailer for that game! I've been so excited about it for months and Ive been watching the trailer almost every day.

Anyway, sorry this is so long. But i'm going to go with my gut and say Hollow Knight. Its beautiful, amazing, and overall just..perfect.

Answer:

hollow knight is pretty good

Explanation:

What is touch-typing?typing with a keyboard shortcut
typing with macros
typing with only one hand
typing without looking at the keyboard

Answers

Typing without looking at the keyboard and using all fingers. I do this, so I'm 99% that's the correct answer.
Typing without looking at the keyboard.

Last one

Describe how the presence or absence of balance can affect a visitor’s perceptions of a Web page.

Answers

Answer: the assessment of the destination image can assist managers by identifying the ... In particular, potential visitors with limited knowledge of destinations depend on ... Thus, a destination web page becomes a fundamental instrument in ... it and whose presence or absence determines the tourist's perception.

Explanation:

Bargain Bob's auto dealership sells vehicles. He sells Chrysler, Jeep, and Dodge brand vehicles. He tracks customer and manufacturer. Bob tracks only the main owner—all co-owners and co-signers are recorded elsewhere.Based on the description above, what is the maximum cardinality between each instance of "Customer" and "Vehicle?"

Answers

Based on the given description in the question, the maximum cardinality assignment of the customer and vehicle is; one customer to one vehicle mapping

Cardinal Mapping

Cardinality is simply defined as the mapping of entities or group of entities to a certain cardinal value. This means that cardinality seeks to highlight the relationship between two objects such as eggs in a crate or shoes on a rack.

Now, in this question, we see that the car dealer sells one car to a customer and tracks the customer and manufacturer for that particular vehicle. This is simply 1 to 1 mapping and as such the maximum cardinality assignment of the customer and vehicle is one (1) to one (1) mapping.

Read more on Mapping at; brainly.com/question/1625866

Answer:

Customer(1) - (1) Vehicle.

Explanation:

Cardinality is the mapping of entities or group of entities to a cardinal value. It tries to show the relationship between two objects like a cups in a shelf or plates in racks.

The car dealer in the question, sells one car to a customer and keep or prioritise the record of the main owner of the acquired vehicle. So the maximum cardinality assignment of the customer and vehicle is one (1) to one (1) mapping.

. In Stack we can access elements from both ends

o True

o False

Answers

Answer:

False

Explanation:

The answer is False. In Stacks, we can access only the top element present in the stack. Stack is the collection of elements which follow LIFO ( Last In First Out ) which means the last element inserted in the stack is the first element to  out. Stack has restriction that only the element which is present at the top called as top element is only accessible. That means only the top element can be inserted and deleted.

Egovernment involves the use of strategies and technologies to transform government by improving the delivery of services and enhancing the quality of interaction between the citizen-consumer within all branches of government. Group of answer choices

Answers

What are you asking for