File format show the logical steps

Assignment Help Basic Computer Science
Reference no: EM131716593

Using python as in .py file format show the logical steps to answer these questions

1) Write a program which asks the user to enter an integer between 0 and 100 and outputs the sum of the digits of the number entered.
Hint: You can use the modulo operator to extract digits (93%10 = 3) and the integer division operator to remove digits (91//10 = 9).

Sample program output:
Please enter a number between 0 and 100: 89
The sum of the digits is: 17

2)Write a program which asks the user to enter an 8 digit number and outputs the number reversed.

Hint: You can use the modulo operator to extract digits (93%10 = 3) and the integer division operator to remove digits (91//10 = 9).

Sample program output:

Please enter a number: 89123231

The reverse is: 13232198

Reference no: EM131716593

Questions Cloud

Why you would use either normative or ethical approach : Explain why you would use either a normative or ethical approach.
Design elements-context-content and community : How well does it score on the 7 C's of design elements. context, content, community, customization, communication connection and commerce?
What is the best way to find job opportunities : What should one of your first steps in preparing to seek employment be? What is the best way to find job opportunities?
Targeted leadership development plan : Write up 5pages essay (that summarizes what you’ve learned from these tools in terms of your strengths and potential development areas.
File format show the logical steps : Using python as in .py file format show the logical steps to answer these questions
Why a substance use disorder : Why a substance use disorder and HIV/AIDS could be considered as co-occurring disorders
Filename and that the file can be opened : In this program, you should be able to open any FASTA file by inputting the command fasta and the file name (so the command line is "fasta filename") and
Defects be allowed when there is no cure or treatment : Should screening for diseases or defects be allowed when there is no cure or treatment? Why or why not?
What role should medical technology play : What role does/should medical technology play in determining whether to remove someone from life support?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Types of pre-created objects that can be used on web sites

Types of pre-created objects that can be used on Web sites. Describe the objects you find and what they are used for. Include links to the sites you used in your research.

  Discuss how server virtualization

From the e-Activity, discuss how server virtualization, architecture, and Hyper-V can create advantages and efficiencies for an enterprise, including considerations for how to decide what an enterprise should factor in when calculating Return on Inve..

  About power point presentation

Weekly tasks or assignments (Individual or Group Projects) will be due by Monday, and late submissions will be assigned a late penalty in accordance with the late penalty policy found in the syllabus.

  Determine if there is evidence of scope creep

Determine if there is evidence of scope creep. Show and defend a likely project priority matrix. Just needs to be one to two paragraphs.

  Simulate a telephone customer service center

Design, implement, and test a computer program to simulate a bank. Your simulation should evaluate the average time customers have to wait in line before they are served by a teller

  Common types of clustering

Compare and contrast the two common types of clustering; failover and load-balancing clusters, and discuss which type you would prefer to implement.

  What other constraints can you think of for this database

Assume that an order can be shipped from several warehouses. Specify the foreign keys for this schema, stating any assumptions you make. What other constraints can you think of for this database?

  Write a regular expression that selects lines

Write a regular expression that selects lines containing the pattern shell. For this exercise you must surround your solution with double quotes.

  Find the minimum number of rows needed

Suppose instead you want to arrange the children in rows such that if i hates j, then i must be in a lower numbered row than j. Give an efficient algorithm to find the minimum number of rows needed, if it is possible.

  Problem regarding the benchmark tests

Scenario: Ted has PC5400-DDR2 installed on his motherboard. The memory slots are maxed out. He now upgrades the processor but when doing some benchmark tests, he is disappointed that the system does not seem any faster. Can you suggest any reasons..

  Securing owa

In order to effectively implement Outlook Web Access (OWA) and allow employees to have seamless access to email, you must provide external access to users. This, of course, creates a security weakness in your network because of open ports. Your senio..

  What do the following commands do

What do the following commands do

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd