Computer Networking: A Top-Down Approach (7th Edition)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Define a function named loop_string_reverse to reverse a string using loops that accepts the original string and returns the reversed string. But the numbers in the string are ignored.
If the user input is he2ll8o will resolve to hello after removing the numbers 2 and 8 which will produce olleh as the reverse string output
We make the following assumptions
- all strings entered by user are lowercase
- You may use the string.isnumeric() method in the Python standard library that returns True if all characters are numeric containing 0-9 else it returns False
Transcribed Image Text:35.2 Lecture 19-Apr-Q2
Define a function named loop_string_reverse to reverse a string using loops that accepts the original string and returns the reversed
string. But the numbers in the string are ignored.
If the user input is he21180 will resolve to hello after removing the numbers 2 and 8 which will produce olleh as the reverse string output
We make the following assumptions
• all strings entered by user are lowercase
• You may use the string.isnumeric() method in the Python standard library that returns True if all characters are numeric
containing 0-9 else it returns False
376584.2127280.qx3zay7
LAB
35.2.1: Lecture 19-Apr-Q2
0/ 10
ACTIVITY
main.py
Load default template..
1 #define your function here
2
3
4
5 #do not change the following lines of code
6 if
name_=="_main_":
print(loop_string_reverse("he21180")=="olleh")
print(loop_string_reverse("abra56dabra660")=="oarba77darba")
print(loop_string_reverse("abra56dabra660")=="oarbadarba")
7
8
6
10
print(loop_string_reverse("aloha")=="ahola")
11
12
Run your program as often as you'd like, before submitting for grading. Below, type any needed
input values in the first box, then click Run program and observe the program's output in the
Develop mode
Submit mode
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Background pattern image
Similar questions
- Please help with this question in python Write a python function that accept a string as input and calculates number of upper case letters and lower-case letters. Make use of python debugger modulearrow_forwardUse For loop please C++ given code /* Cipher Lab using C strings */ /* Running the program looks like:Enter some lower-case text: helloShifting 0 gives: helloShifting 1 gives: ifmmpShifting 2 gives: jgnnqShifting 3 gives: khoorShifting 4 gives: lippsShifting 5 gives: mjqqtShifting 6 gives: nkrruShifting 7 gives: olssvShifting 8 gives: pmttwShifting 9 gives: qnuuxShifting 10 gives: rovvyShifting 11 gives: spwwzShifting 12 gives: tqxxaShifting 13 gives: uryybShifting 14 gives: vszzcShifting 15 gives: wtaadShifting 16 gives: xubbeShifting 17 gives: yvccfShifting 18 gives: zwddgShifting 19 gives: axeehShifting 20 gives: byffiShifting 21 gives: czggjShifting 22 gives: dahhkShifting 23 gives: ebiilShifting 24 gives: fcjjmShifting 25 gives: gdkkn*/ #include <iostream>#include <iomanip>#include <cctype> using namespace std; // Global constantsconst int MaxWordSize = 81; // 80 characters + 1 for NULL // Given an array of characters and a shift value:// shift each character...arrow_forwardUse a while loop function instead of a for loop sing pythonarrow_forward
Recommended textbooks for you
- Text book imageComputer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONText book imageComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceText book imageNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Text book imageConcepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningText book imagePrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationText book imageSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Text book image
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Text book image
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Text book image
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Text book image
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Text book image
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Text book image
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY