Write a program that reads a one-line sentence as input and then displays the following response: If the sentence ends with a question mark and the input contains an even number of characters, display the word Yes. IF the sentence ends with a question mark and the input contains an odd amount of characters, display the word No. If the sentence ends with an exclamation point, display the word Wow. In all other cases display the words You always say followed by the input string enclosed in quotes

Answers

Answer 1

The program is an illustration of conditional statements

What are conditional statements?

Conditional statements are statements used to make decisions

The main program

The program written in Python, where comments are used to explain each action is as follows:

#This gets the input for the sentence

sentence = input("Word: ")

#This counts the number of characters

countChar = len(sentence)

#The following if conditions print the required output from the test conditions

if(sentence[-1] == "?" and countChar%2 == 0):

   print("Yes")

elif(sentence[-1] == "?" and countChar%2 == 1):

   print("No")

elif(sentence[-1] == "!"):

   print("Wow")

else:

   print("Nice",sentence)

Read more about conditional statements at:

https://brainly.com/question/24833629


Related Questions

Select the correct answer from each drop-down menu.
Complete the following paragraph about the Supreme Court ruling in the Tinker v. Des Moines case.
In its ruling in the Tinker v. Des Moines case, the US Supreme Court overturned the original decision made by a district court in Ohio. In its 7–2 Tinker decision, the Supreme Court ruled that students had the right to express themselves through
, as long as doing so did not disrupt schooling. The Tinker case is important in that it protected students'
.

Answers

The Supreme Court ruled that students had the right to express themselves through free speech, as long as doing so did not disrupt schooling.

What is the case Tinker v. Des Moines case about

The court was said to have made a 7-2 decision. Here, the Supreme Court's majority is said to have passed a decision that neither students nor teachers “used their constitutional rights to freedom of speech or expression that was done in the schoolhouse gate.

The Court was said to have ruled that that school officials could not hinder only on the suspicion that the speech can scatter the learning process of student.

Learn more about Tinker v. Des Moines case from

https://brainly.com/question/10957190

Answer:

wearing symbols such as armbands

First amendment rights

Explanation:

PLEASE PLEASE HELP!!!!! ONLY GOT AN HOUR!!!!!
WILLL GIVE BRAINLIEST AND 5-STAR RATING!
The Prince (1519) Machiavelli

So the conclusion is: If you take control of a state, you should make a list of all the crimes you have to commit and do them all at once. That way you will not have to commit new atrocities every day, and you will be able, by not repeating your evil deeds, to reassure your subjects and to win their support by treating them well. He who acts otherwise, either out of squeamishness or out of bad judgment, has to hold a bloody knife in his hand all the time. He can never rely on his subjects, for they can never trust him, for he is always making new attacks upon them. Do all the harm you must at one and the same time, that way the full extent of it will not be noticed, and it will give least offense. One should do good, on the other hand, little by little, so people can fully appreciate it.

A ruler should, above all, behave towards his subjects in such a way that, whatever happens, whether for good or ill, he has no need to change his policies. For if you fall on evil times and are obliged to change course, you will not have time to benefit from the harm you do, and the good you do will do you no good, because people will think you have been forced to do it, and they will not be in the slightest bit grateful to you.

The document above is an excerpt from Machiavelli’s famous work, The Prince. Using the document and your knowledge of European history, answer all parts (A), B), and C)) of the question below.

A) Briefly explain what was taking place politically in Italy during the Renaissance.

B) Briefly explain what actions Machiavelli is saying a ruler should take in order to be a successful ruler.

C) Analyze why Machiavelli might have taken the stance he did in The Prince.

Answers

Answer:

Answers are below

Explanation:

A. ) Italian politics during the time of the Renaissance was dominated by the rising merchant class, especially one family, The House of Medici.

B. ) Princes achieve the most success when they are crafty, cunning and able to trick others.

C. ) Machiavelli desperately wanted to return to politics.

When did time begin?

Did we invent math or did we discover it?

Where does a thought go when it's forgotten?

Do we have free will or is everything predestined?

Is there life after death?

Is it really possible to experience anything objectively?

What are dreams?

What is the goal of humanity?​

Answers

For when did time begin, it didn’t really begin? It just kinda happened and we don’t know when it sorta started because we haven’t reached that far into it to know exactly what happened.

We invented math to help us explain certain things like science and many other things.

It doesn’t go anywhere, it stays there but your thoughts just go off to other thoughts so eventually you forget that previous though. It’ll stay in the back of your memory so that is why we randomly remember things that we’ve thought of before.

Technically, we have free will but because the world we live in we need to have structure and laws in place so we don’t kill each other and everything is even.

We do not know if there is life after death but, people do have their own opinions and beliefs on if there is a life beyond death. The reason why we don’t know if there’s a life after death because you can’t come back from death. Most of the time when people come back to life, during certain situations, you cannot hundred percent believe what they say.

Dreams are an iffy topic because we don’t really know too much where they come from. Though, usually dreams happen when you were put into REM stage of sleep, during this time your brain has very high activity that resembles the same waves as when you’re awake.

Technically, there is no goal to humanity because all of the goals we think we have are just thoughts and personal goals. The only goal as a species we have though is to repopulate like any other species on this planet.
.
.
.
I hope that some of this helps, sorry if some of the spelling is bad because English is not my first language.

Answer:

time began aproximately 14 billón years ago

thoughts dont go anywhere they come and then go

Explanation:

most of the questions u ask the answer only you know its what you belife

An economic impact of immigration in the late 1800s

Answers

Answer:

many jobs were taken by those immigrants becuase they would produce faster than other workers meaning that the jobs that would take about 1 year would take 6 months.

Explanation:

what were the laws against jews in nazi germany (Chronologically)

Answers

Answer:1933–1938

Following the appointment of Adolf Hitler as German chancellor on January 30, 1933, the Nazi state (also referred to as the Third Reich) quickly became a regime in which citizens had no guaranteed basic rights. The Nazi rise to power brought an end to the Weimar Republic, the German parliamentary democracy established after World War I.  In 1933, the regime established the first concentration camps, imprisoning its political opponents,  Jehovah’s Witnesses, and others classified as “dangerous.”  Extensive propaganda was used to spread the Nazi Party’s racist goals and ideals. During the first six years of Hitler’s dictatorship, German Jews felt the effects of more than 400 decrees and regulations that restricted all aspects of their public and private lives.

Explanation:hope this helps!! love ya -marina mae

Hello people ~
how did hitler rise to power?​

Answers

Hii

 Hitler rose to power began in the newly established Weimar Republic in September 1919 when Hitler joined a political party known as the Deutsche Arbeiterpartei – DAP (German Workers' Party). Hitler rose to a place of prominence in the early years of the party. Being one of its best speakers, he was made the party leader after he threatened to otherwise leave.

Answer:

Btw I wrote this entire thing by myself (brainly guidelines didn't let me upload it so I screenshotted it)

Explanation:

I think its C guys what do you guys think? do you agree or is it D?​

Answers

I am not smart but I think d as well

Answer:

C

Explanation:

D is wrong

7. Explain how the scramble for Africa continues to impact Africa. Do you think former imperial
powers have an obligation to help with current problems? Why or why not?

Answers

Answer:

The 'Scramble for Africa' – the artificial drawing of African political boundaries among European powers in the end of the 19th century – led to the partitioning of several ethnicities across newly created African states. ... Despite their arbitrariness these boundaries endured after African independence

Explanation:

this should be right:)

How was the House of Burgesses Important to the development of democracy in the thirteen colonles?
o It was the first representative assembly of the colonies
It created the first written constitution in America
It included the bill of rights to protect Individual rights
o It Introduced the principle of electing judges

Answers

Answer:

the last one

Explanation:

I think that's the answer because it was the first democratic government in America.

What was one function of the great cathedrals during the Middle Ages?

provide a sanctuary for the priests
serve as a symbol of authority
help people endure the Middle Ages
provide the rich people with education

Answers

Answer:

Cathedrals were an important buildings of the Middle Ages. People went to mass and thought they could get a place in heaven when they attended . ... People got married in cathedrals and funerals also took place there . Some kings and queens were even buried in cathedrals.

what was one effect of the Burlington treaty? history​

Answers

Answer:

The most significant result of the treaty was that it effectively lifted any former restrictions in regards to emigration to the United States from China; with large-scale immigration to the United States beginning in earnest by Chinese immigrants.

Explanation:

ASAP I NEED HELP ON THIS​

Answers

Answer:

1. im tied between 2 answers hold on

2. portugal

Answer:

people within a civilization will start doing communal jobs

Portugal

plz don't report me

What was the open door policy and how did it lead to the boxer rebellion

Answers

Answer:

Open Door Policy would guarantee equal trading rights for all and prevent one nation from discriminating against another within its sphere. Boxer was the popular name for members of the secret group called the Society of Harmonious Fists, who practiced a system of exercise they thought would protect them from bullets.

REWORDED: The Open Door Policy would assure that everyone has equal commercial rights and would prevent one country from discriminating against another inside its area of influence. Members of the secret society known as the Society of Harmonious Fists were known as boxers because they performed a method of practice that they believed would protect them from shootings.

Explanation:

Hope this helped :)  Cuz these teachers be buggin tbh

The 3 branches of government's main duties are?

Answers

How the U.S. Government Is Organized

Legislative—Makes laws (Congress, comprised of the House of Representatives and Senate)

Executive—Carries out laws (president, vice president, Cabinet, most federal agencies)

Judicial—Evaluates laws (Supreme Court and other courts)

Which passage of the 14th amendment did this violate?

All persons born or naturalized in the United States, and subject to the jurisdiction thereof, are citizens of the United States and of the State
wherein they reside... nor shall any state deprive any person of life, liberty, or property, without due process of law, nor deny to any person
within its jurisdiction the equal protection of the laws.

Answers

Answer:

The 14th Amendment to the U.S. Constitution, ratified in 1868, granted citizenship to all persons born or naturalized in the United States—including former slaves—and guaranteed all citizens “equal protection of the laws.” One of three amendments passed during the Reconstruction era to abolish slavery and establish civil and legal rights for black Americans, it would become the basis for many landmark Supreme Court decisions over the years.

credits to History

Explanation:

Answer: Without due process of law.

Explanation: I got this on my test

story of Michael Jackson​

Answers

Michael Joseph Jackson was an American singer, songwriter, and dancer. Dubbed the King of Pop. he is regarded as one of the most significant cultural figures of the 20th century and he is born on August 29, 1958, in Gary, Indiana. Jackson began performing with his four brothers in the pop group the Jackson 5 when he was a child. The group scored its first No.

Which geographic feature did Jim Bridger mistake for the Pacific Ocean? Cascade Mountains Great Salt Lake Lake Superior Atlantic Ocean.

Answers

The Pacific Ocean is the largest and longest of the Earth's five oceans. It stretches from the Arctic Ocean in the north to the Southern Ocean in the south and is surrounded in the west by Asia and Australia, and in the east by the Americas.

What is the Great Salt Lake?

The Great Salt Lake has a vibrant and one-of-a-kind atmosphere. It is most recognized for being a major stopover for migrating birds.

"The Great Salt Lake is the Pacific flyway's largest inland body of water," said Baxter "This is an important feeding and growing area for migrating birds before they continue on their journey."

"As a result, Option B is the right answer because it is the geographic feature that Jim Bridger misidentified as the Pacific Ocean.

For more information about Great Salt lake refer to the link:

https://brainly.com/question/11260869

~H A L P P P~

* W I L L M A R K B R A I N L I E S T*

What did the Continental Army hope to accomplish?

Answers

They fought for independence and freedom


Why is New Orleans vulnerable to flooding? Check all that apply.
The city does not have an adequate rain-catching system.
The city is near the ocean.
The city is below sea level.
The city is built in a bowl between levees.
The city cannot quickly remove water.

Answers

Answer:

The city is below sea level.

Explanation:

New Orleans is vulnerable to flooding because of many factors which include the following:

1. Much of the city was built below sea level. Few people were only able to build at about 10 feet above sea level in the city.

2. Much of the city was built on loose soil.

3. Generally, considering the global climate crisis, sea levels rising.

Hence, considering the options available, the correct answer is "The city is below sea level."

Answer:

New Orleans was Vulnerable to flooding when Katrina struck because Much of the City is below the sea level.

Plz help me i only have 5 min.

Answers

Answer:

c

Explanation:

i not sure

3. Why did European nations compete for control over territory in the Americas?

Answers

Answer:

brhrhrfhhhrrhdbfvdufsusfufgi thtt8ubbtjtyky

as a result of the soviet-afghan war was communism contained or did it expand explain?
Please help

Answers

The Soviet Union's unblemished casus belli was a consequence of anti-communist guerillas during the Afghan War that had risen up to remove the established Marxist and pro-Lenin authorities, '78 to '92. The war originally started because of an underground movement refining itself in Afghanistan, the president, Mohammad Daud Khan, being targeted himself. These guerillas were conducted by Nur Taraki, and by the People's Party and the Banner's Party, both parties were communists. So yes, you could say that the war did leverage and augment Communism throughout the world, or Asia.

What was business like in the roaring 20’s?

Answers

Answer:

Throughout the 1920s, each year saw a rise in every leading economic indicator . Income levels rose as did business growth, new construction, and stock market trading.

Explanation:

the economy was striving. Workers, for example, made 26 percent more in 1929 than they had in 1919

Which of the following statements accurately characterizes the women's suffrage movement?
А The women's suffrage movement was united, especially in the approach it adopted for achieving the vote.
B
The federal court system was used by the women's suffrage movement to advance its cause and eventually achieve the vote.
с
Men, especially husbands and politicians, were forbidden to join or otherwise participate in the women's suffrage movement.
D
The women's suffrage movement pushed for voting rights in individual states while also pushing for a constitutional amendment.

Answers

Answer:

i believe its A im not sure though

Explanation:

Why we need to know the history of Philippines?​

Answers

Answer:

The Philippines is an incredibly diverse nation in terms of language, religion, ethnicity and also geography. Ethnic and religious fault-lines that run through the country continue to produce a state of constant, low-level civil war between north and south. Beautiful and fractious, the Philippines is one of the most interesting countries in Asia.

Explanation:

Do you agree or disagree with Jacob Riis? Can democracy survive in the slums? i put 30 of points on this please answer quickly.

Answers

Answer:

I don't think that democracy can survive in the slums. I think so because people in the slums are always treated badly for the things they don't have and they have to turn to illegal means to survive. It's do or die in the slums and Democracy died in a losing battle.

Explanation:

Why was the tacky revolution important give 2 reasons

Answers

Answer:

Tacky’s position as overseer on the Frontier plantation gave him the opportunity to draw up some simple but effective plans to gain freedom and to easily get them to his trusted followers both at Frontier and neighbouring Trinity plantations.

Explanation:

Does this help you???

How did the urban league differ from the NAACP?

Answers

Answer:

The Urban League was devoted to promoting economic opportunities for African Americans in cities. ... TheNAACP, on the other hand, wasexplicitly founded (in 1909, just one year before the Urban League) to promote political, legal, and social equality.

what was one power a guild had in the middle ages????

Answers

Answer:

Guilds provided a way for trade skills to be learned and passed down from generation to generation.

Explanation:

According to Alexis de Tocqueville, why was populism a key to the United States' success as a democracy?​

Answers

Answer:

Alexis de Tocqueville

Democracy in America

Five Values

1. Laissez-Faire- government policy of "hands off" economy

2. Individualism- free to flourish; meritocracy; the individual is as or more

important than the collective

3. Populism- participation of common people

4. Egalitarianism- society of equals under the law; no nobility

5. Liberty- protection from tyranny, rule of law, religious faith

Explanation:

mark me brainliest!!

Other Questions
Rewrite as a square or a cube:3 3/8 What is the interquartile range of this data?Enter your answer in the box. PLZ HELP FASTTT Click an item in the list or group of pictures at the bottom of the problem and, holding the button down, drag it into the correct position in the answer box. Release your mouse button when the item is place. If you change your mind, drag the item to the trashcan. Click the trashcan to clear all your answers.Simplify without negative exponents. Does anyone know the answer to number 4? 1. How many stages are there in the product life cycle? What are they? when and how was the great schism resloved? 1. What do you think are the importance of 5S Principles?2. Cite a situation in which you can apply the knowledge of understanding 5S Principles? Find mHELP THIS IS IMPORTANT good evening! Can someone please answer this, ill give you brainliest and your earning 50 points. Would be very appreciated. Please helppp ASAP Content attributionQUESTION 12 1 POINT53mFind the LCD for 5/m2+9m+20, 3m/m2+11m+28 A and B are complementary. The measure of A is 75.What is the measure of B?Enter your answer in the box. Why did England ban the colonists from making manufactured goods Five times the product of two numbers x and y divided by a third number 27 Can someone please help me with this tynker lesson! Plz help me! find the solution set s^2=16 Write a report analyzing the Cold War policy of containment!!!!!!ATLEAST 300 words What was true of the Greek language during the Hellenistic age?The Greek language spread throughout the colonies.The Greek language combined with native languages.Schools were established to teach the Greek language.All scientific discoveries were recorded in the Greek language. How does rainfall cause soil erosion? The time it takes for a pendulum of a grandfather clock to swing back and forth one time is called the period of the pendulum. For a pendulum of length L (in feet), the period T (in seconds) is given by the equation T = 1.57 x Square root of L/2 . What is the period (in seconds) of a pendulum that is 8 feet long? Type the exact answer. Do not label seconds in your answer. PLEASE ANSWER AS FAST AS POSSIBLE The real GDP of the U.S. economy was $19,222.0 billion at the end of 2019. a. Calculate the real GDP in 5 years time if (1) growth is 3% per year, and (2) growth is 2% per year. b. What is the difference in GDP between a growth rate of 2% and one of 3% over those 5 years?