menu
Login
Register
search
Log In
account_circle
Log In
Email or Username
Password
Remember
Log In
Register
I forgot my password
Register
Username
Email
Password
Register
add
Q&A
Questions
Unanswered
Tags
Users
Ask a Question
Articles
Interview Questions
Programming Quiz
Post An Article
Recent Posts
error in grid.call.graphics(c_setviewport, vp, true) : non-finite location and/or size for viewport
curses is not supported on this machine (please install/reinstall curses for an optimal experience)
A variable declaration announces the name of a variable that will be used in a program, as well as:
Python find unique values in list
Data Gateways in the Cloud Native Era
Python sort one list by another
Removing element from a list python
How to get image url from file
python find largest value in list
Are jpeg and jpg the same
Write an expression that evaluates to true if the str associated with s starts with "p"?
0
votes
188
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"?
arrays
function
program
python
asked
Feb 17, 2020
maddi86
●
7
●
5
●
3
5,380 points
answer
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Solution:
You can try with expression.
s.startswith("p")
This might help you.
answered
Feb 17, 2020
guudduu
●
8
●
5
●
2
10,530 points
ask related question
comment
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
What is the color of the sky?
To avoid this verification in future, please
log in
or
register
.
Add comment
Cancel
Related questions
0
votes
1
answer
109
views
109
views
Write an expression that evaluates to true if and only if the c-string s equals the c-string "end"?
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, 2020
maddi86
5.4k
points
function
program
arrays
java
0
votes
1
answer
38
views
38
views
Write an expression that evaluates to true if and only if s refers to the str "end"?
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"?
asked
Feb 18, 2020
maddi86
5.4k
points
program
0
votes
1
answer
129
views
129
views
Write an expression whose value is the character at index 3 of the str associated with s?
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, 2020
maddi86
5.4k
points
program
function
0
votes
1
answer
85
views
85
views
Write an expression that whose value is the fifth character of the string name?
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, 2020
maddi86
5.4k
points
program
function
0
votes
1
answer
1
view
1
view
write an expression that evaluates to true if and only if the value of x is equal to zero.
asked
21 hours
ago
Muneeb Saadii
2.4k
points
0
votes
1
answer
42
views
42
views
Write a method max that has two string parameters and returns the larger of the two.
Problem: Hi there! I am new to the world of programming. My programming teacher gave me an assignment in which I have to write a program in which there would be a function that will take two strings as input from user and will compare the size of both strings ... the larger string of the two. I have no clue how to do that. Please provide me with the sample program with proper description. Thanks
asked
Nov 25, 2020
Code Learner
5.6k
points
c#
string
parameters
function
program
0
votes
2
answers
306
views
306
views
Write the definition of a method max that has three int parameters and returns the largest?
Problem: I am new to programming, so need query to get query to return max number from 3 integer? Write the definition of a method max that has three int parameters and returns the largest? Can anyone guide with correct code?
asked
Feb 17, 2020
maddi86
5.4k
points
parameters
program
function
string
1
vote
1
answer
168
views
168
views
write an expression that executes the loop body as long as the user enters a non-negative number.
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, 2020
LizzyM
6.1k
points
program
java
0
votes
1
answer
80
views
80
views
Write a literal representing the false value?
Problems: Can anyone give the right solution? Write a literal representing the false value?
asked
Feb 14, 2020
maddi86
5.4k
points
program
function
0
votes
1
answer
7
views
7
views
Can you create a method that returns a value of the same type as the class?
Problem: Would the following code be correct? class Person { private: string name; bool sex; int age; public: Person (); bool getSexo (); int getAge (); Person play (string s); }Hope someone could help me out?
asked
Jan 25
sasha
8.4k
points
function
parameters
c#
program
poo