bjectives:This week you will gain understanding about Input, process and output. How does apython program work from input to output and various functions that help you towrite a basic python program? This week you also understand the concept ofvariables in your program and why are they important.You also learn about various data types for your variables. In process part you learnabout expressions and how operators are used in a python expression.Activity – 1:Draw a flowchart for a program to convert given kilometres to miles.Activity – 2:Write a pseudocode to display an area of a circle for a given radius.Activity – 3:Sales PredictionA company has determined that its annual profit is typically 23 percent of totalsales. Write a program that asks the user to enter the projected amount oftotal sales, and then displays the profit that will be made from that amount.Hint: Use the value 0.23 to represent 23 percent.Activity – 4:Land CalculationOne acre of land is equivalent to 43,560 square feet. Write a program thatasks the user to enter the total square feet in a tract of land and calculatesthe number of acres in the tract. Hint: Divide the amount entered by 43,560to get the number of acres.
Question
bjectives:This week you will gain understanding about Input, process and output. How does apython program work from input to output and various functions that help you towrite a basic python program? This week you also understand the concept ofvariables in your program and why are they important.You also learn about various data types for your variables. In process part you learnabout expressions and how operators are used in a python expression.Activity – 1:Draw a flowchart for a program to convert given kilometres to miles.Activity – 2:Write a pseudocode to display an area of a circle for a given radius.Activity – 3:Sales PredictionA company has determined that its annual profit is typically 23 percent of totalsales. Write a program that asks the user to enter the projected amount oftotal sales, and then displays the profit that will be made from that amount.Hint: Use the value 0.23 to represent 23 percent.Activity – 4:Land CalculationOne acre of land is equivalent to 43,560 square feet. Write a program thatasks the user to enter the total square feet in a tract of land and calculatesthe number of acres in the tract. Hint: Divide the amount entered by 43,560to get the number of acres.
Solution
Sure, here are the answers to your activities:
Activity – 1: Flowchart for a program to convert given kilometres to miles:
- Start
- Input kilometres
- Multiply kilometres by 0.621371 to convert to miles
- Output miles
- End
Activity – 2: Pseudocode to display an area of a circle for a given radius:
- Start
- Input radius
- Calculate area as 3.14 * radius * radius
- Output area
- End
Activity – 3: Pseudocode for Sales Prediction:
- Start
- Input total sales
- Calculate profit as 0.23 * total sales
- Output profit
- End
Activity – 4: Pseudocode for Land Calculation:
- Start
- Input total square feet
- Calculate acres as total square feet / 43560
- Output acres
- End
Similar Questions
tell me about Python
Outline the process of input, processing, and output in Python programs. Describe a real-worldscenario where this process is crucial, such as data entry and processing in a retail system. (5 Marks)
Programming is the way we assign instructions to a computer, so that it performs various tasks for us. We create step by step instructions (in the form of programming statements), that are converted into binary instructions that a computer can execute.Code must be designed, implemented, compiled and tested to ensure the computer performs the tasks correctly.By completing this subject you will achieve a strong foundation in basic programming skills and software design for both Java and Python.Topics covered include branching program flow, iterative program flow, collections, classes, methods, function, access control, file input and output.Upon completion of this subject,
Discuss the concept of variables in Python, contrasting them with constants. Provide examples toillustrate how variables are used differently from constants in a program.
Question 10What does the Python input() function do?1 pointPause the program and read data from the userConnect to the network and retrieve a web page.Read the memory of the running programTake a screen shot from an area of the screen
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.