Write a python program that asks user to input a integer

Assignment Help Python Programming
Reference no: EM132103979

Problem : Write a Python program that asks user to input a positive integer n and prints out certain numbers.

a. Print the first n cubes.

For example, if n = 4, the output is:

1

8

27

64

b. Print perfect cubes < n.

For example, if n = 30, the output is:

1

8

27

c. Print the sum of i**3 for all 1 <= i <= n.

For example, if n = 5, the output is:

225

(Use while loops)

Reference no: EM132103979

Questions Cloud

How do you find the average spacing between atoms : How do you find the average spacing between atoms in the crystal for this problem, I am having trouble.
How would you determine an appropriate value for threshold : Your boss asks you to determine the number of erroneous login attempts that should be allowed before a user's account is locked.
Write the five queue operations for this implementation : Write the five queue operations for this implementation.Compare this implementation with the circular queue implementation discussed in class.
Describe the process as it happens in example : Justify your selection and give your own example of how mass influences acceleration and describe the process as it happens in your example.
Write a python program that asks user to input a integer : Write a Python program that asks user to input a positive integer n and prints out certain numbers.
What does an electron in an atom do when it absorbs energy : What does an electron in an atom do when it absorbs energy? When it releases energy?
Design of a 4-bit magnitude comparator : Design, simulate and verify a 4-bit magnitude comparator in Verilog. Use a variety of inputs to test your design and include the results in your report.
Equivalent resistance and total current : What is the equivalent resistance and total current in the circuit?
What would the total resistance of the circuit be : If the current through the circuit is 2 A, how many light bulbs are there in the circuit?

Reviews

Write a Review

Python Programming Questions & Answers

  Create a python program for managing media check-out

Create a python program for managing media check-out/check-in with members - Store a list of checked out items for a member and create a method to display it

  Write a python function named numvowels

Write a Python function named numVowels that is passed a string containing letters, each of which may be in either uppercase or lowercase.

  Write a program that generates hundred random numbers

In both Visual Logic and Python languages, write a program that generates 100 random numbers between 0 and 10. Print out the entire list of numbers generated.

  Scene recognition using object detection

Using the images and their annotations (dataset will be provided by me), train the capsule neural network, Fast-RCNN, Faster RCNN and Mask RCNN

  Write a program that asks the user for a letter

Write a program that asks the user for a letter - This function will take as input the original letter input by the user so that it can be included in the output sentence.

  Python programming to solve this problem

Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

  1 one factor that leads to a decline in biodiversity is the

1. one factor that leads to a decline in biodiversity is the introduction of non-native species. however most species

  Write an application that allows user to read account number

Write a Python application that allows the user to read, validate, store, display, sort and search the account number and balance for N bank customers.

  Write a program using python to implement a password cracker

Write a program using Python to implement a password cracker for Linux. You should utilize a dictionary (small - English) to crack the password.

  Create a Python program to implement Stack ADT

Create a Python program to implement Stack ADT using both Lists and Linked Lists that includes the following operations: To add a data element in the stack.

  Project - expand the simulation with a class hierarchy

Project: Expand the Simulation with a Class Hierarchy. Purpose: Expand classes into a hierarchy. Introduce a View to the Model-View-Controller design pattern. Provide more functionality to the simulation

  Displays the charges for a patients hospital stay

Write a program that computes and displays the charges for a patient's hospital stay. First, the program should ask patient name and if the patient was admitted as an in-patient or an out-patient.

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