Write a loop that counts the number of digits that appear in the string referenced by mystring

computer science

Description

 Assume choice references a string. The following if statement determines whether a choice is equal to ‘Y’ or ‘y’: if choice == 'Y' or choice == 'y': Rewrite this statement so it only makes one comparison and does not use the or operator. (Hint: use either the upper or lower methods.)

  1.  Write a loop that counts the number of digits that appear in the string referenced by mystring.
  2.  Write a function that accepts a string as an argument and returns true if the argument ends with the substring ' .com '. Otherwise, the function should return false.
  3.  Write a function that accepts a string as an argument and displays the string backward.
  4.  Assume mystring references a string. Write a statement that uses a slicing expression and displays the last 3 characters in the string.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.