answersLogoWhite

0


Best Answer

In order to display multiples of 9 up to 500 I would use a while loop with the condition number < 500. For example:

#set number to the first multiple of 9

number = 9;

while number < 500:

print number;

#add 9 to the number

number += 9;

Note: I put semicolons at the end of each line out of habit. Python does not require this.

Note: lines beginning with # are comments

The above code will print the current value of number, then add 9 to it. It will continue to do this until number is greater than or equal to 500.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program for generate multiples of 9 upto 500 using PYTHON?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Can you run a python program using code Can you give me the code I need to use in order for it to work I am using codio plz help?

Assuming you only intend executing your code on your own machine and you have some version of Python installed, you can execute a Python script from within your code in the same way you can execute a Python script via the command line: python script.py infile outfile -o


How do you make a app using the python programming language and not using py2app?

Py2app for the Mac, or Py2exe for Windows, create a standalone executable file from a Python program, which can run without the Python interpreter. You can always run the application within the Python interpreter. If you want to create an executable file, Python includes no built-in tools to do this; you need an application such as Py2app or Py2exe. Of course, you might search for alternative tools, that do the same thing.


Write a program to generate uppercase using cSharp?

string s = "asdfqwer"; s = s.ToUpper(System.Globalization.CultureInfo.CurrentCulture);


How do you generate a parse tree from an expression using C program?

c code for top down parser


Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


Write a c program to generate student mark details using union and find total and average and grade?

write a c program to display marks,total,average,grade using union


Can EXCEL generate different permitations?

Using the Permut function, you can find out how many permutations can be got from a set of values. To actually generate the individual permutations you would need a program.


How do you make a program in python using do while loop to display the multiplication table of number from one to ten?

a = 0while a < 10 :a += 1print (a)Write the above simple script in a text editor (I use nano). Save as loop.py in home folder. To run, open a terminal and at the prompt, write: python loop.pyResult:rodney@downstairs:~$ python loop.py12345678910


Which is the least sustainable practice?

Using coal to generate electricity. (APEX)


How to generate multi component sine wave signal by using matlab program?

Generating Sine and Cosine Signals (Use updated lab)


How do you generate quantum program using spss?

The Question is slightly unclear. If you have a SPSS file and you want to generate the Quantum program you can use the utility called spss2qt. This is a small program in SPSS that will convert the SPSS data into ASCII data with a Quantum program with proper column location. However you will have to modify the program to display output to your requirement as this utility will give very basic quantum program for the data. Regards Sachin You can reach me on sacsar@yahoo.com


Is python 2.2 a antivirus software?

Python is a programming language, it is used to make computer programs. so you could write an antivirus using python.