Write a for loop that prints out the numbers zero to ten

Assignment Help Computer Engineering
Reference no: EM131862564

Assignment

Follow the instructions provided below.

1. Write a for loop that prints out the numbers 0 to 10.

2. Write a for loop that prints out the numbers 5 to 10.

3. Write a for loop that prints out the numbers -15 to -10.

4. Write a for loop that prints out the numbers -20 to -25 (Hint: Use three arguments).

5. Write a for loop that prints out ONLY the even numbers from 0 to 10 inclusive.

Use an IF statement and the mod (%) operator rather than changing the parameters of the range() function.

6. Ask the user to enter a value and store the result in a variable called n.

Use a for loop to calculate the factorial of n, or the product of all numbers from 1 to n.

Formula: n factorial = 1 * 2 * 3 * ... * (n - 1) * n

7. Write a *nested* for loop that produces the output shown in the Blackboard attachment.

Hint: What values do your indexes have to be?
Hint: Do you have to cast any values?

Reference no: EM131862564

Questions Cloud

What is the total focus length ftot of device : We place an object 5 m on the left from the device. What is the position of the image? What is the total focus length ftot of this device?
Identify a form of ar that could address your problem : Identify a form of AR that could address your identified research problem and produce actionable recommendations to ameliorate it
What is the t-bill bond equivalent yield in percent : Suppose you purchase a T-bill that is 117 days from maturity for $9,602. What is the T-bill’s bond equivalent yield in percent?
What is the average acceleration : A car accelerates from 0 to 60 mph in 4.5 seconds. a.) What is the average acceleration, in mph/s?
Write a for loop that prints out the numbers zero to ten : Write a for loop that prints out the numbers 0 to 10. Write a for loop that prints out the numbers -20 to -25 (Hint: Use three arguments).
What issues arise based on the districts demographics : What issues arise based on the district's demographics (this will help you think about your platform)
Develop a survey to collect feedback from the employees : Imagine that you are a member of the HR department of a small retail company and upper management has asked you to create a new employee customer service.
What is the bond equivalent yield in percent : A bank has issued a six-month, $1,990,312 million negotiable CD with a 0.95 percent. What is the bond equivalent yield in percent?
Calculate the molar concentration of the stock solution : Calculate the molar concentration of the stock solution.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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