• Register
0 votes
16 views

Problem:

I am new to programming, I need help, can anyone help me?

Write an expression that evaluates to True if and only if s refers to the str "end"?

7 5 3
5,380 points

1 Answer

0 votes

Solution:

 

we can write query as 

s=="end"

This will help you and you can use in your code.

7 4 2
10,530 points

Related questions

0 votes
1 answer 69 views
69 views
Solutions: I am new in programming and my logic is not good, can anyone give the right solution? Write an expression that evaluates to true if and only if the C-string s equals the C-string "end"?
asked Feb 14 maddi86 5.4k points
0 votes
1 answer 113 views
113 views
Problem: I am new in programming and stuck in a query, can anyone guide me? Write an expression that evaluates to True if the str associated with s starts with "p"?
asked Feb 17 maddi86 5.4k points
0 votes
1 answer 60 views
60 views
Problem: Write an expression whose value is the str that consists of the third to last character of the str associated with s I tried s[2:] didn't work. Can you please guide me with right solution?
asked Feb 19 maddi86 5.4k points
1 vote
1 answer 78 views
78 views
Problem: Can anyone provide me an expression that executes the loop body as long as the user enters a non-negative number. Thanks in advance.
asked Apr 9 LizzyM 6.1k points
0 votes
1 answer 52 views
52 views
Problem: Can anyone help it was actually asked in exam as following and I need to know whether my answer was right or not? Write an expression that whose value is the fifth character of the String name?
asked Feb 24 maddi86 5.4k points