Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Having trouble implementing this part of the code.
not sure if I should use if/else for range of days then print how many months that is; if i do that I would have to do the range up until 750 days.
or is there another way to do it?
expand button
Transcribed Image Text:def months (cell_digit):
days
143
(cell_digit)**((cell_digit%2)+1)* (cell_digit)
(days/30)
144
145
MONTHS
146
147
148
Transcribed Image Text:Description: This function gets the last digit of your cellphone and returns an integer that
be months used for your "Title Movie", where months >= 1.
First you need to determine a number of days with the following formula:
days = *(cell_digit)
(cell_digit)((cell_digit%2)+1)
After, you need to transform the number of days to months. Assume a month has 30 days,
return the value based on the range of days. Note that 1 is the minimum number of months
Range of days
0 - 30
31 - 60
Months
1
2
61 - 90
3
...
721 - 750
25
Parameters: cell_digit (int) is the last digit of your cellphone.
Return value: An integer that represents a number of months, where months >= 1.
OU MUST implement a math operation to determine the number of months, NO hard coding allov
xamples:
months(0)
O days >> 1 month
# 92 * 9 = 729 davs >> 25 months
→ 1
# 01 * 0
months (9) → 25
Expert Solution
Check Markarrow_forward
Step 1
Having trouble implementing this part of the code.
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 2 steps
Knowledge Booster
Background pattern image
Similar questions
- Just explain it and don't use bullet points and also the code written doesn't need to be breaker through it's just to be taken a little help from. The code is not the main thing in this questionarrow_forwardUse pythonarrow_forwardWe can't use "break" in this code, can you change to other ways to do it? (maybe use if or if else or if else if) plz provide a screenshot of the code and out put . Thanksarrow_forward
- I need the answer as soon as possiblearrow_forwardBut for the name == quit, you are still using the break, can you also change that one too?arrow_forwardI can't seem to figure this out.. for python You have a business that cleans floors in commercial space and offices. You charge customers 0ドル.45 per square yard, and some customers require multiple cleanings every month. You need two custom functions for your business. The first function takes a floor's length and width in feet and returns the area in square yards. The second void function takes the area, charge per square yard, and number of monthly cleanings as arguments and prints the cleaning cost. This latter function uses selection logic to print different output for single and multiple monthly cleanings (see Sample Outputs). Use a properly named constant for the charge per square yard, too.arrow_forward
- Hello. I am having a bit of trouble with this code. Its about making a running log using O(n) (linear) notation but I keep having problems figuring it out. I would appreciate the help for figuring out this code. Thanks. This is the problem: Write a program that: Asks the user for number of runs For each run, ask the user What the distance was in miles (in decimal format, e.g. 3.1 miles is acceptable) What the time was in minutes (in decimal format, e.g. 23.9 minutes is acceptable) Output the average pace (in minutes per mile) of all runs. Please paste the code down below. Thanks.arrow_forwardCSC108H Loops and Strings Lab 1 For-Loops and Strings It's common to write loops that process characters of strings. Remember that you can use a regular for-loop if all you need are the characters, and a range for-loop if you need the indices. 1. Assign the string "superconductivity" to a variable s. 2. Write a loop that prints each character in s on a separate line. 3. Write a loop that prints each character in s on the same line, with a comma and a space after each character: s, u, p, e, r, C, etc. Notice that there is a comma after the last character. We won't worry about this. To do this, build a new string that includes the appropriate characters, then print that new string. 2 Solving a Problem Now let's solve a problem from the Chapter 3 exercises. The problem is called English or French: https://dmoj.ca/problem/ccc11s1 Let's do some analysis on this problem to give us a plan that we can follow. 3 1. Notice that the English/French data is spread over N lines. Which of the three...arrow_forwardStart with a penny, double it every day. How much do you have in a 30-day month? ***How do I fix my code? I want the output to look the expected output in red.***arrow_forward
- I need help with Java code. I'm not sure how to start...arrow_forwardYOU SHOULD NOT USE LOOPS (for, while,....) OR CONDITIONALS (if..else,....),For this question, you should use Math function for doing the "power" and "π". When printingthe volume and the area values, DON’T ENTER THEM MANUALLY. Only print 2 numbers after the decimal points.arrow_forwardPython code. Is there a different way to write the same code? Thanks!arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education