C How to Program (8th Edition)
8th Edition
ISBN: 9780133976892
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 1, Problem 1.14MD
Program Plan Intro
To define a procedure that can be used to replace the gender-specific words with gender-neutral ones through a paragraph of text.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Exercise 2 - Primer on Loop
Referring to the code for drawing an equilateral triangle provided to you earlier in this prac
sheet, you may have noticed that, in order to draw the triangle, we are repeating a set of two
commands three times i.e. robot.forward( 100) followed by robotright(120). Python (and many other
programming languages) provide us a tool called a "Loop" to repeat a certain set of steps a
certain number of times. As usual, in order to use loops, we have learn the correct Python
syntax for it. The following Python code uses a loop to draw the same equilateral triangle as the
code provided earlier:
import turtle
wn - turtle.Screen()
wn.bgcolor("white"
robot - turtle. Turtle()
robot. setheading(90)
robot shape("turtle")
robot.colort"green"
robot. pensize(3)
for i in range(3):
robot. forward( 100)
robot. right(120)
wn.exitonclick()
Note that the lines that fall under the line that starts with "for" have to be indented; this means
that you have to insert spaces or tabs (USE…
Topical Information
Use C++. The purpose of this project is to test your ability to use files, strings (Strings?), and libraries effectively in program design.
Program Information
A popular past-time is the word search puzzle (if you don't believe me, look in your daily paper and in the news stand in the check-out line at the grocery store). In such a puzzle, a grid of letters is presented which presumably contains words. However, the words are cleverly hidden among the other letters. Their camouflage is aided by them being aligned in many different orientations: horizontal, vertical, diagonal, and sometimes even backwards! The person's goal is to find the words and circle each one. Most often the person is also given a list of the words which should be found:
apple hananabs
pear mpearoap
banana npsgrape
grape uleapnbm
orange…
4
Chapter 1 Solutions
C How to Program (8th Edition)
Ch. 1 - Categorize each of the following items as either...Ch. 1 - Fill in the blanks in each of the following...Ch. 1 - Prob. 1.6ECh. 1 - Prob. 1.7ECh. 1 - Prob. 1.8ECh. 1 - (Internet Negatives) Besides their numerous...Ch. 1 - Prob. 1.10ECh. 1 - (Test-Drive: Body Mass Index Calculator) Obesity...Ch. 1 - Prob. 1.14MDCh. 1 - (Privacy) Some online e-mail services save all...
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- 4arrow_forwardOnly write it in python languagearrow_forwardCan you help me with this program?In C++ The room contains n*n cubes (in rows and columns). Each cube is white or black. You can get out of a white cube by going in one of the four directions horizontally or vertically (but you can't go beyond the scope of the room). You can get out in a black cube, but you can't get out of it. There is a mouse and a piece of cheese in the room. The mouse is in a cube (0,0) - white, and the cheese in a cube (n-1, n-1) - black. The mouse can move from cube to cube according to the rules described above. Write a program that finds all the paths that can be moved to the cheese with the mouse and if it appears, display it with ‘*’. An example diagram of the task is shown in the figure: Operating instructions: Compose a recursive function path (int i, int j), receiving as parameters the coordinates of the current position of the mouse (initially 0.0, and then run with parameters (i-1, j), (i + 1, j), ( i, j-1) or (i, j + 1)).arrow_forward
- Programming Language :- Carrow_forwardPython Language] Using loops of any kind, lists, or is not allowed. At the Academy of Crime Fighting, each trainee is recognized by a unique 5-digit identifier. The identifier can have any of the following digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The identifier can have leading 0s. Since Drew the owl has trouble typing numbers, the school makes things easier by ensuring that each successive digit in the identifier is either one digit greater or one digit less than the previous digit. For example, if the first digit is 3, then the successive digit would be 4 or 2. So, 32345 would be a valid trainee identifier, but 32435 would NOT be a valid identifier because the third digit 4 is two digits away from the previous digit 2. Your task is to write a program that validates an identifier. Input The input consists of five lines; the first line is the first digit of the trainee identifier, the second line is the second digit of the trainee identifier, and so on. Output If the trainee identifier is…arrow_forwardContext: Using Python, I am also a beginner in programming. Having a hard time completing this practice and assisstance is appreciatedarrow_forward
- [Python Language] Using loops of any kind, lists, or is not allowed. Angela loves reading books. She recently started reading an AI generated series called “Harry Trotter”. Angela is collecting books from the series at her nearest bookstore. Since the series is AI generated, the publishers have produced an infinite collection of the books where each book is identified by a unique integer. The bookstore has exactly one copy of each book. Angela wants to buy the books in the range [l,r], where l ≤ r. As an example, the range [−3,3] means that Angela wants to buy the books − 3, − 2, − 1, 0, 1, 2, and 3. Dan also loves the series (or maybe annoying Angela – who knows, really), and he manages to sneak into the bookstore very early to buy all of the books in the range [d,u], where d ≤ u. When Angela later visits, sadly she will not find those books there anymore. For example, if Angela tries to buy books [−2,3] and Dan has bought books [0,2], Angela would only receive books − 2, − 1,…arrow_forwardUSE PYTHON Source: en.wikipedia.org/wiki/Camel_case In some languages, it’s common to use camel caseLinks to an external site. (otherwise known as “mixed case”) for variables’ names when those names comprise multiple words, whereby the first letter of the first word is lowercase but the first letter of each subsequent word is uppercase. For instance, whereas a variable for a user’s name might be called name, a variable for a user’s first name might be called firstName, and a variable for a user’s preferred first name (e.g., nickname) might be called preferredFirstName. Python, by contrast, recommendsLinks to an external site. snake caseLinks to an external site., whereby words are instead separated by underscores (_), with all letters in lowercase. For instance, those same variables would be called name, first_name, and preferred_first_name, respectively, in Python. In a file called camel.py, implement a program that prompts the user for the name of a variable in camel case and outputs…arrow_forwardDO NOT USE EXISTING ANSWERS ON CHEGG OR COURSE HERO OR ANY OTHER SERVICES PLEASE! Thanks :) CODE IN PYTHON AND SHOW COMMENTS TO EXPLAIN CODE A confused Dutchman trying to speak English could say “I am in the war”, even though there is no hostile activity going on. The confusion1 here is that the English sentence “I am confused” is translated in Dutch as “Ik ben in de war”, which is phonetically (“sounding”) quite close to the first sentence. Such confusion leads to much enjoyment, but can complicate matters a bit. Given a sentence in Dutch and a dictionary containing both correct translations as well as phonetic (incorrect) translations of individual words, find the translation of the sentence and indicate whether it is correct, or in case there is more than one find the total number of correct and incorrect translations. A sentence is correctly translated when each word of the sentence is correctly translated. Input The input consists of: One line with an integer n (1≤n≤20), the…arrow_forward
- Use java language to code this.arrow_forwardC++ Programming Language: Enhance the code given by outputting: The largest number of the sequence a0 ,a1 ,a2 , ..., ak. The position of the largest number Test your program for the following values of x: 75, 111, 678, 732, 873, 2048, and 65535. Example: "For example, for the input sequence: 75, 226, 113, 340, 170, 85, 256, 128, 64, 32, 16, 8, 4, 2, 1, the program output should contain the following: The largest number of the sequence is 340 The position of the largest number is 4" Code Given: #include <iostream> #include <iomanip> using namespace std; int main() { long x; int count; long a_n; cout << "Enter a nonnegative integer: "; cin >> x; cout << endl; count = 0; a_n = x; cout << a_n << ", "; while (a_n !=1) { if (a_n %2==0) a_n = a_n / 2; else a_n = 3 * a_n + 1; count++; cout << a_n <<", "; } cout << endl; cout << "The integer k such that a_k = 1 is " << count << endl; return0; }arrow_forwardPlease use java and not use arrays The purpose of this assignment is to practice OOP with Fundamental of Data Type, Constructing Objects and Classes, Decisions, Loops. Introduction: In English vocabulary there are many interesting and meaningful phenomena, such as isogram, pangram, malapropisms, anagram, palindrome, etc., which leave a “room” for language-learners to enthusiastically discover secret, surprise, and something different instead of negatively listing words. They make the boring vocabulary lesson an interactive practical course that helps to grasp interest of students as English language-learners.1 Some of these interesting linguistic phenomena2 are: Isogram: referred to a word, phrase, or sentence in which no letter of the alphabet occurs more than once. For example; the words “ambidextrously”, “endolymphatic”, and “unpredictably”. Pangram: A phrase or sentence containing all 26 letters of the alphabet (ideally repeating as few letters as possible). For example; the…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education