Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

how to use def function in python to translate a string in lower case to upper case without use the function .upper(), i know it

how to use def function in python to translate a string in lower case to upper case without use the function .upper(), i know it should be first to translate the sting to ascii code and modifed the code, however, how am i able to do that when the string is a sentenceimage text in transcribed

The due date for this assignment is Sunday, March 18, 2018, by 11:00pm. Internet slang has entered (relatively) widespread usage, evolving from its roots as an obfuscation technique into a form of communication used principally to express dissatisfaction with the performance of a teammate or to caption photographs of domesticated animals. For this assignment, you will write a program for something resembling a 1337 (i.e., leetspeak) translator, that will receive a single sentence as a string argument and produce a string return value for the equivalent sentence in 1337. If you are not familiar with this "language", read more at https://en.wikipedia.org/wiki/Leet. For this assignment, you need to write a series of functions. Download (and rename) the "starting_point_for_assignment_5.py" file from cuLearn, and add the required functionality: Write a main function that prompts the user to type a string and then remove all punctuation marks and replace all lowercase letters with their uppercase equivalent (using calls to the functions described below that you will write). Display this text to . the user and then ask... ...if the user wants to replace phrases? o o ...if the user wants to replace words? o ...if the user wants to replace letters and, if so, what letters? Depending upon how the user responds to each question, you would then call some or all of the functions described below (that you will write), printing the result after each step. After printing the final result you must ask the user if they would like to translate another string and, if the answer is yes, loop back to the input prompt. (n.b., Do NOT call the main () function again to achieve this repetition - use a loop.) Carleton COMP1405B (Winter 2018) - "Introduction to Computer Science I" Specification for Assignment 5 of 6 UNIVERSITY . Write a write a function to replace every lowercase character to its uppercase equivalent You may not use upper0, and your solution must use the ord) and/or chr(O functions. You may not use functions like encode or replace either - you are expected to use loops to accomplish this replacement. This function must take only the string to be modified as an argument and must return the new string

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Fred R. McFadden, Jeffrey Slater, Mary B. Prescott

5th Edition

0805360549, 978-0805360547

More Books

Students also viewed these Databases questions