1. Write a program that prompts the user to input three integer values and find the...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
1. Write a program that prompts the user to input three integer values and find the greatest value of the three values. Note: Be careful when handling equal values. 2. Write a program that finds the largest and smallest of four integers entered by user. Enter four integers: 21 43 10 35 Largest: 43 Smallest: 10 3. Write a program that checks if entered year is a leap year. (A leap year is a multiple of 4, and if it is a multiple of 100, it must also be a multiple of 400.) 4. Write the program that converts a numerical grade into a letter grade. The scale is as following: 90-100A, 80-89 B, 70-79 -> C, 60-69 -> D, 0-59-> F. If the entered number is larger than 100 or less than 0, give some error message as output. OUTPUT Enter a numerical grade: 811 Letter grade: B 5. Write a program that will let the user enter the number and then it will output "even" if the number is even, and "odd" if the number is odd. EXAMPLE OUTPUT 1 Enter the number: 369 The number is odd EXAMPLE OUTPUT 2 Enter the number: 866 The number is even 6. Write a program that will prompt user to enter a 4 digits integers and separate integer into digits. 7. Write a program that prompts the user to enter an integer and checks whether the number is divisible by both 5 and 6, or neither of them, or just one of them. Here are some sample outputs for inputs 10,30, 23. EXAMPLE OUTPUT 1 Enter the number 10 10 is divisible by 5 or 6, but not both EXAMPLE OUTPUT 2 Enter the number 30 30 is divisible by both 5 and 6 EXAMPLE OUTPUT 3 Enter the number 23 23 is not divisible by neither 5 or 6 1. Write a program that prompts the user to input three integer values and find the greatest value of the three values. Note: Be careful when handling equal values. 2. Write a program that finds the largest and smallest of four integers entered by user. Enter four integers: 21 43 10 35 Largest: 43 Smallest: 10 3. Write a program that checks if entered year is a leap year. (A leap year is a multiple of 4, and if it is a multiple of 100, it must also be a multiple of 400.) 4. Write the program that converts a numerical grade into a letter grade. The scale is as following: 90-100A, 80-89 B, 70-79 -> C, 60-69 -> D, 0-59-> F. If the entered number is larger than 100 or less than 0, give some error message as output. OUTPUT Enter a numerical grade: 811 Letter grade: B 5. Write a program that will let the user enter the number and then it will output "even" if the number is even, and "odd" if the number is odd. EXAMPLE OUTPUT 1 Enter the number: 369 The number is odd EXAMPLE OUTPUT 2 Enter the number: 866 The number is even 6. Write a program that will prompt user to enter a 4 digits integers and separate integer into digits. 7. Write a program that prompts the user to enter an integer and checks whether the number is divisible by both 5 and 6, or neither of them, or just one of them. Here are some sample outputs for inputs 10,30, 23. EXAMPLE OUTPUT 1 Enter the number 10 10 is divisible by 5 or 6, but not both EXAMPLE OUTPUT 2 Enter the number 30 30 is divisible by both 5 and 6 EXAMPLE OUTPUT 3 Enter the number 23 23 is not divisible by neither 5 or 6
Expert Answer:
Answer rating: 100% (QA)
Python 1 numbers intx for x in inputEnter four integers split largest maxnumbers smallest minnumbers ... View the full answer
Related Book For
Principles Of Information Security
ISBN: 9780357506431
7th Edition
Authors: Michael E. Whitman, Herbert J. Mattord
Posted Date:
Students also viewed these programming questions
-
a) Explain how a firewall does address translation when it receives a TCP packet from a remote web server intended for a web client on the private network and the translation table contains the...
-
1. A proposed project has a negative NPV. Does it mean that the project has a negative IRR? Why or why not? 2. Does including the tax consequences of estimated future cash flow in DCF models likely...
-
The per-pupil costs (in thousands of dollars) for cyber charter school tuition for school districts in three areas in a certain state in the US are shown in Table 3. At a 0.05, is there a difference...
-
The most popular Java GUI containers include: . a. JFrame Form, JDialog Form, JPanel Form b. JPanel Form, JPlugins Form, JCanvas Form c. JPanel Form, JMaven Form, PHP Form d. JFrame Form, JField...
-
Why is the demand for San Francisco cigarettes so much more price elastic than the overall market demand for cigarettes?
-
Lemon Quench manufactures a soft drink. The company is organized into two divisions: glass and filling. The glass division makes bottles and sells them to the filling division. Each division manager...
-
How many degrees of freedom are there? Exercises 1015 refer to the following data: Anthropologists can estimate the birthrate of an ancient society by studying the age distribution of skeletons found...
-
1. What will happen to the value of the U.S. dollar if oil producers decide to invest most of their earnings from oil sales in domestic infrastructure projects? 2. What factors determine the relative...
-
A shoe manufacturer received orders for 205, 215, and 210 pairs of shoes in September, October, and November, respectively. The production line can manufacture a maximum of 200 pairs of shoes per...
-
Refer to the first 100 minutes of the computer simulation of the current operation of Herr Cutter's barber shop presented in Figure 12.7 and summarized in Figure 12.8. Now consider the alternative of...
-
An attacker can use a method named Port Scanning to examine which ports are open on a given host, learning details about which software the server is running on publicly-addressable interfaces. This...
-
During one of your instructor's lectures, take notes following the format described in the section "Compiling Fieldnotes." After the lecture, comment to yourself on selected notes in the left-hand...
-
Choose a function from a writing tool (e.g., columns or page layouts) and trace a brief history of it. Where did this technology or function come from? What does a person have to understand to know...
-
Describe in detail what you actually do to plan for class projects (i.e., do you keep schedules and tasks "in your head," do you use a paper planner, do you create time lines or remind yourself with...
-
What does it mean to be socialized into the culture of an organization? How might we understand technical documents as socialization tools?
-
Study the organizational chart in figure 3.5. What kinds of day-to-day activities would you expect to take place for the employees in each box? How would you expect them to share information across...
-
1) Explain, the Time Value of Money (TVM) concept, 2) show, supported with numerical examples : (a) 5 examples of the application of the TVM concept in personal life , and (b) 5 examples of the...
-
Use multiplication or division of power series to find the first three nonzero terms in the Maclaurin series for each function. y = e x2 cos x
-
I. Assess the need that physical security of information security systems is as important as logical or computer security processes. II. Review the list of the seven most common sources of physical...
-
Which of the following is the strongest symmetric encryption cryptosystem? a. Data Encryption System (DES) b. Advanced Encryption Standard (AES) c. Triple DES (3DES) d. RSA algorithm
-
Explain that the Payment Card Industry (PCI) Security Standards Council offers a standard of performance to which participating organizations must comply. Point out that it is not a law, but is a...
-
A stepped bar, fixed at \(x=0\) and free at \(x=l\), has a cross-sectional area of \(2 A\) for \(0 \leq x
-
Estimate the fundamental frequency for the longitudinal vibration of a uniform bar fixed at \(x=0\) and free at \(x=l\) by assuming the mode shapes as (a) \(U(x)=c_{1}(x / l)\) and (b) \(U(x)=c_{1}(x...
-
Estimate the fundamental frequency of a fixed-fixed string, assuming the mode shape (a) \(W(x)=c_{1} x(l-x)\) and (b) \(W(x)=c_{1} x(l-x)+c_{2} x^{2}(l-x)^{2}\).
Study smarter with the SolutionInn App