Computer Science: An Overview (13th Edition) (What's New in Computer Science)
13th Edition
ISBN: 9780134875460
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 1, Problem 58CRP
Program Plan Intro
Python is defined as the object oriented
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Working with cell addresses
The address of a cell in Google sheets can be specified in two ways: either as a letter-number pair like C5, or as a pair of numbers like "row 5, column 3". Some formulas may be easier to specify on one way or the other, so it's useful to know how to convert from one form to the other and back.
ROW() and COLUMN() take addresses in A1 format and return the number of the row and column respectively.
ADDRESS() takes numeric row and column inputs and returns the address in A1 format. It also has an option argument to specify the relativity of the addresses: 1 (the default) returns absolute addresses; 2, 3, and 4 return row absolute, column absolute, and relative addresses respectively.
In this chapter you'll be working with Indian butterfly data from Singh and Pandey.
Instructions
In column H, get the row numbers of the Locality column.
In column I, get the column numbers of that column.
In column J, convert columns H and I back to addresses in $A$1…
Use the strategy of the decimal to binary conversion implemented in Project 4, and the bit shift left operation defined in Project 5 to code a new encryption algorithm.
The algorithm should
Add 1 to each character’s numeric ASCII value.
Convert it to a bit string.
Shift the bits of this string one place to the left.
A single-space character in the encrypted string separates the resulting bit strings.
An example of the program input and output is shown below:
Enter a message: Hello world!
0010011 1001101 1011011 1011011 1100001 000011 1110001 1100001 1100111 1011011 1001011 000101
Make a program to convert a number from decimal notation to a number expressed in a number system whose base (or radix) is a number between 2 and 9. The conversion is performed by repetitious division by the base to which a number is being converted and then taking the remainders of division in the reverse order. For example, in converting to binary, number 6 requires three such division: 6/2=3 remainder 0, 3/2 =1 remainder 1, and finally, 1/2=0 remainder 1. The remainders 0, 1 and 1 are put in the reverse order so that the binary equivalent of 6 is equal to 110. Modify your program so that it can perform a conversion in the case when the base is a number between 11 and 27. Number system with bases greater than 10 require to 1A in hexadecimal notation since 26/16=1 remainder 10 (that is, A) and 1/16=0 remainder 1.
Note:
solve as soon as possible
use c++ language
Chapter 1 Solutions
Computer Science: An Overview (13th Edition) (What's New in Computer Science)
Ch. 1.1 - What input bit patterns will cause the following...Ch. 1.1 - In the text, we claimed that placing a 1 on the...Ch. 1.1 - Assuming that both inputs to the flip-flop in...Ch. 1.1 - a. If the output of an AND gate is passed through...Ch. 1.1 - Prob. 5QECh. 1.1 - Prob. 6QECh. 1.2 - If the memory cell whose address is 5 contains the...Ch. 1.2 - Prob. 2QECh. 1.2 - Design a sequence of steps that correctly...Ch. 1.2 - How many bits would be in the memory of a computer...
Ch. 1.3 - Prob. 1QECh. 1.3 - Prob. 2QECh. 1.3 - Prob. 3QECh. 1.3 - Prob. 4QECh. 1.3 - Prob. 5QECh. 1.3 - Prob. 6QECh. 1.4 - Here is a message encoded in ASCII using 8 bits...Ch. 1.4 - In the ASCII code, what is the relationship...Ch. 1.4 - Prob. 3QECh. 1.4 - Prob. 4QECh. 1.4 - Convert each of the following binary...Ch. 1.4 - Prob. 6QECh. 1.4 - What is the largest numeric value that could be...Ch. 1.4 - An alternative to hexadecimal notation for...Ch. 1.4 - What is an advantage of representing images via...Ch. 1.4 - Prob. 10QECh. 1.5 - Convert each of the following binary...Ch. 1.5 - Convert each of the following base ten...Ch. 1.5 - Convert each of the following binary...Ch. 1.5 - Express the following values in binary notation:...Ch. 1.5 - Perform the following additions in binary...Ch. 1.6 - Convert each of the following twos complement...Ch. 1.6 - Prob. 2QECh. 1.6 - Suppose the following bit patterns represent...Ch. 1.6 - Suppose a machine stores numbers in twos...Ch. 1.6 - In the following problems, each bit pattern...Ch. 1.6 - Prob. 6QECh. 1.6 - Prob. 7QECh. 1.6 - Prob. 8QECh. 1.6 - Prob. 9QECh. 1.6 - Prob. 10QECh. 1.6 - Prob. 11QECh. 1.7 - Prob. 1QECh. 1.7 - Prob. 3QECh. 1.7 - Prob. 4QECh. 1.8 - What makes Python an interpreted programming...Ch. 1.8 - Write Python statements that print the following:...Ch. 1.8 - Write Python statements to make the following...Ch. 1.8 - Write a Python statement that given an existing...Ch. 1.9 - Prob. 1QECh. 1.9 - Prob. 2QECh. 1.9 - Prob. 3QECh. 1.9 - Prob. 4QECh. 1.9 - Prob. 5QECh. 1.9 - Prob. 6QECh. 1.9 - Prob. 7QECh. 1.10 - Prob. 1QECh. 1.10 - Could errors have occurred in a byte from Question...Ch. 1.10 - Prob. 3QECh. 1.10 - Prob. 4QECh. 1.10 - Prob. 5QECh. 1.10 - Prob. 6QECh. 1 - Determine the output of each of the following...Ch. 1 - a. What Boolean operation does the circuit...Ch. 1 - a. If we were to purchase a flip-flop circuit from...Ch. 1 - Assume that both of the inputs in the following...Ch. 1 - The following table represents the addresses and...Ch. 1 - How many cells can be in a computers main memory...Ch. 1 - Prob. 7CRPCh. 1 - Prob. 8CRPCh. 1 - Prob. 9CRPCh. 1 - Prob. 10CRPCh. 1 - Suppose a picture is represented on a display...Ch. 1 - Prob. 12CRPCh. 1 - Prob. 13CRPCh. 1 - If each sector on a magnetic disk contains 1024...Ch. 1 - How many bytes of storage space would be required...Ch. 1 - Prob. 16CRPCh. 1 - Prob. 17CRPCh. 1 - Suppose a typist could type 60 words per minute...Ch. 1 - Prob. 19CRPCh. 1 - Prob. 20CRPCh. 1 - Prob. 21CRPCh. 1 - Prob. 22CRPCh. 1 - Prob. 23CRPCh. 1 - Prob. 24CRPCh. 1 - Prob. 25CRPCh. 1 - Prob. 26CRPCh. 1 - Prob. 27CRPCh. 1 - Prob. 28CRPCh. 1 - Prob. 29CRPCh. 1 - Prob. 30CRPCh. 1 - Prob. 31CRPCh. 1 - Prob. 32CRPCh. 1 - Prob. 33CRPCh. 1 - Prob. 34CRPCh. 1 - Prob. 35CRPCh. 1 - Prob. 36CRPCh. 1 - Prob. 37CRPCh. 1 - Prob. 38CRPCh. 1 - Prob. 39CRPCh. 1 - Prob. 40CRPCh. 1 - Prob. 41CRPCh. 1 - Prob. 42CRPCh. 1 - Prob. 43CRPCh. 1 - Prob. 44CRPCh. 1 - Prob. 45CRPCh. 1 - What would be the hexadecimal representation of...Ch. 1 - Prob. 47CRPCh. 1 - Prob. 48CRPCh. 1 - Prob. 49CRPCh. 1 - Prob. 50CRPCh. 1 - Prob. 51CRPCh. 1 - Prob. 52CRPCh. 1 - Prob. 53CRPCh. 1 - Prob. 54CRPCh. 1 - Prob. 55CRPCh. 1 - Prob. 56CRPCh. 1 - Prob. 57CRPCh. 1 - Prob. 58CRPCh. 1 - Write and test a Python script that, given a...Ch. 1 - Prob. 61CRPCh. 1 - Prob. 2SICh. 1 - Prob. 3SICh. 1 - Prob. 4SICh. 1 - Prob. 5SICh. 1 - Prob. 6SICh. 1 - Prob. 7SI
Knowledge Booster
Similar questions
- The Namibia University of Science and Technology would like to introduce an automated student number and email generation system. The system takes into consideration the following: a) To generate the student number it takes three letters(the first, middle and last letter) of the student’s surname and adds it to the first three letters from the first name, then finally adds a three digit postfix number. b) To generate the email is quite easy it just takes the first letter from the first name and adds it to the surname , then it adds the @students.nust.na postfix Your task is to create a program that can achieve the above requirements when given the students surname, first name and three digit postfix through CMD arguementsarrow_forward2. The computer in mars has a fivenary memory - that is each location can hold a frit value, with a frit holding 0, 1, 2, 3, or 4. How many frits are needed to hold a 6-octal_bit number. Give an expression for the number of frits to hold n octal bits.arrow_forwardThe statement below is correct in at least one number system (besides base-1). That is, the statement is correct if we assume the numbers are expressed in a base other than 10. It is up to you to find out 2 Which number base makes each statement correct? You need to justify your answer by converting the numbers in each operation to base 10 and showing that the statement is correct. For example, 36/6 = 7 is clearly not correct in base 10 but it is correct in base 12 because 3612 =4210 and 4210/610 = 710. Thus, 3612/612 = 712 is true. 140 x 3 / 102 = 10arrow_forward
- Below is a text written entirely in binary. Your goal is to convert this to English using the ASCII. Consider the asterisks (*) as word separators. For clarity, the punctuation marks have not been converted to their ASCII values. 1000010 1100101 1100110 1101111 1110010 1100101 *1101000 1100101 *1100011 1101111 1110101 1101100 1100100 *1110011 1100001 1111001 *1100001 1101110 1111001 1110100 1101000 1101001 1101110 1100111, *"1010011 1110100 1100101 1110110 1100101, *1110100 1101000 1101001 1110011 *1101000 1100001 1110011 *1100111 1101111 1110100 *1110100 1101111 *1110011 1110100 1101111 1110000.arrow_forwardWrite a program to handle a user's rolodex entries. (A rolodex is a system with tagged cards each representing a contact. It would contain a name, address, and phone number. In this day and age, it would probably have an email address as well.) Typical operations people want to do to a rolodex entry are: 1) Add entry 2) Edit entry 3) Delete entry 4) Find entry 5) Print all entries 6) Quit You can decide what the maximum number of rolodex entries is and how long each part of an entry is (name, address, etc.). When they choose to edit an entry, give them the option of selecting from the current rolodex entries or returning to the main menu — don't force them to edit someone just because they chose that option. Similarly for deleting an entry. Also don't forget that when deleting an entry, you must move all following entries down to fill in the gap. If they want to add an entry and the rolodex is full, offer them the choice to return to the main menu or select a person to overwrite. When…arrow_forwardWrite a calculator conversion program in Python that converts: A binary number into a hexadecimal number. A hexadecimal number into a binary number. The calculator should be able to handle 16 bits.arrow_forward
- Take as an example the number 143.75. If we put it in scientific notation in base 10 (decimal), then its significand (mantissa) is: And its exponent is: If now we put it in scientific notation in base 2 (binary), then its significand is: And its exponent is: (All answers are numeric. Both of the last two answers should be in binary, and not include leading zeroes).arrow_forward# python Suppose we have a dataset with 1000 images, each image has resolution 1080 by 1920 pixels, and it's represented as an array of numbers in [0, 255] in our program. How much memory (in megabytes) colored RGB images will occupy? (we can use 8bits per pixel to encode intensity)arrow_forwardWe usually write numbers in decimal form (or base 10), meaning numbers are composed using 10 different “digits” {0,1,…,9}.{0,1,…,9}. Sometimes though it is useful to write numbers hexadecimal or base 16. Now there are 16 distinct digits that can be used to form numbers: {0,1,…,9,A,B,C,D,E,F}.{0,1,…,9,A,B,C,D,E,F}.So for example, a 3 digit hexadecimal number might be 2B8. How many 2-digit hexadecimals start with a letter (A-F) or end with a numeral (0-9) (or both)?arrow_forward
- Here's some background information on our Gregorian calendar. Although the Gregoriancalendar was created in 1582, The United States did not adopt it until 1752. Therefore, theGregorian calendar formula for calculating leap years only applies to years 1752 and later in theUnited States. The Gregorian calendar provided an improved formula for calculating whichyears are Leap Years. The criteria for a determining whether a year is a Leap Year is:Leap Year Definition:• The year is evenly divisible by 4; • If the year can be evenly divided by 100, it is NOT a leap year, unless;• The year is also evenly divisible by 400. Then it is a leap year.Your assignment is to create a Python program that in general uses a function to determinewhether a year is a leap year and another function for obtaining year input values from the user.More specifically your program should:1. Contain a function that determines whether a year passed to it is:a. A valid year for the Gregorian calendar usage in the…arrow_forwardTask Write a MASM program that will resemble a digital clock. The clock will display hh:mm:ss (hour, minute and second format; 2 digits for each), i.e., 03:10:05. The clock will take an input from the user (0 to 9) which will be the starting time of the clock. Say the input is 6, so the clock start time is 00:00:06. 00:00:59. You increment the second by one, i.e., 00:00:06, 00:00:07, Then you need to change the minute to 01 and second to 00, i.e., 00:01:00. Similarly, change the time for hour e.g., 00:59:59 will change to 01:00:00. It is a 12 hour clock. After 11:59:59, the clock will change to 00:00:00. You may like to run the attached Calcul.exe to understand the expectation. ● Commenting Most of the lines of the program code should be commented (short comment is fine) so that your code could be well understood.arrow_forwardIn HexWorld, instead of the decimal (base 10) number system we are used to, the hexadecimal numbersystem is used. The hexadecimal number system uses base 16 with digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,F, (where A is 10, B is 11, C is 12, D is 13, E is 14, F is 15). To communicate with HexWorld when numbers areinvolved, we are asking you to help us by coding a Python program, in a file called convert_hex.py, torepeatedly request a positive decimal number from the user and output the hexadecimal value until there areno more decimal values to be converted. We will assume there are no negative values to be converted.To compute the hexadecimal value we have to find the hexadecimal digits hn, hn-1, hn-2, ..., h2, h1, and h0, suchthatdec_value = hn x 16n + hn-1 x 16n-1 + hn-2 x 16n-2 + ... + h2 x 162 + h1 x 161 + h0 x 160These hexadecimal digits can be found by successively dividing dec_value by 16 until the quotient is 0; theremainders are h0, h1, ..., hn-1, hn.For example, if…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