answersLogoWhite

0


Best Answer

This is the program that I couldn't fit in the question: Sorry for the underscores but it wouldn't let me indent

# !/usr/bin/python

# Filename: prime5.py

#<---program is supposed to print prime number chosen--->

y = int(input('How many prime numbers do you want to see?'))

x = 6

w = 0

primes = [2,3,5]

z = len(primes)

j = 0

while w != 1:

____if y*0!=0:

________y = input('Please pick another NUMBER: ')

____elif y*0==0:

________w = w + 1

while z <= y:

____if x % primes[j] (j+1) and x % primes[j] != 0:

________primes.append(x)

________x = x + 1

________j = 0

____elif x % primes[j] != 0:

________j = j + 1

print ('These are the numbers you wanted to know', primes)

User Avatar

Wiki User

13y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

7y ago

Without seeing the program source or the error messages you are encountering it is impossible to say what you are doing wrong.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why wont this python program print work?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you write the code by python?

it depends what type of program you wish to write. python is a very simple programing langauge therefore it doesnt have much room to play with. i mainly use it to work out simple math problems, or use it to calculate thing for games i play, Ex.) This is a program i wrote to work out the Pythagorean therom to find side "C": a = input("Enter Corner Side A\n ") b = input("Enter Corner Side B\n ") c = a*a+b*b import math print math.sqrt(c) raw_input("Press &lt;enter&gt; To Leave Program") input mean that's where you enter your variable, raw input is what you put at the end so it doesnt just run away (NOTE*** THIS IS A PYTHON 2.6.5 SCRIPT, IT WILL NOT WORK ON OTHER VERSIONS OF PYTHON" notice i put ("Press &lt;enter&gt; To Leave Program") this is what it will say before it "runs away". i suggest watching some youtube videos on how to write programs for your version of python. also try using the manual that comes with your version of python. it helps greatly.


Which fields one can choose for career after Python certification?

GIS Analyst, Data Scientist, Python Developer, Product Manager, Data Analyst, Python Trainer are some of the field that you can choose as a career. There are many good institutes that provide deep learning of programming languages. Prognoz Technologies pvt ltd is one of those companies in Mumbai, India that provides python training with internship programs. Visit: Prognoz Technologies pvt ltd


Write a program in c language to print some message on the screen with out using printf?

you can put the printf function inside a if() so that you need not use semicolons. for eg to print my name, if(printf("My Name is Maheedharan")) {} this will work. try this out...


Why might a program that is known not to work continue to receive support?

There is no valid reason to support a program that does not work.


Where are robots used and what are they used for?

That people wont work.

Related questions

How do you print animal kaiser?

u sure u want to print one cuz if u print them they wont auctally work in the game


How do you write the code by python?

it depends what type of program you wish to write. python is a very simple programing langauge therefore it doesnt have much room to play with. i mainly use it to work out simple math problems, or use it to calculate thing for games i play, Ex.) This is a program i wrote to work out the Pythagorean therom to find side "C": a = input("Enter Corner Side A\n ") b = input("Enter Corner Side B\n ") c = a*a+b*b import math print math.sqrt(c) raw_input("Press &lt;enter&gt; To Leave Program") input mean that's where you enter your variable, raw input is what you put at the end so it doesnt just run away (NOTE*** THIS IS A PYTHON 2.6.5 SCRIPT, IT WILL NOT WORK ON OTHER VERSIONS OF PYTHON" notice i put ("Press &lt;enter&gt; To Leave Program") this is what it will say before it "runs away". i suggest watching some youtube videos on how to write programs for your version of python. also try using the manual that comes with your version of python. it helps greatly.


Does brawl busters work on Mac?

No this game wont work on mac unless you have the boot camp program


You tried to download on LimeWire but now it wont work what should you do?

Install java that is one the main causes the program does not work


Write down three problems that might result from giving a presention wihtout using presntation software?

- your computer wont work properly.- you wont be able to print anything out.- and your computer wont load fast.


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


Is word perfect 12 compatible with Windows 7?

I cant get any of the Word Perfect programs 9, 11, 0r 12 to work with Windows 7. Some work iin part but if I go to print it wont work or another wont save files


Did Harvey Kutzman work with Monty Python?

No. He did work with Terry Gilliam, who was a member of the Monty Python team later.


Can python work on vista?

Yes,Python works on almost every Operating System.


Why wont pinger textfree work on your computer?

its simple , your software may not be capable of running the program. or it is simply your browser that is not capable of it.


Did Mel Brooks work with Monty Python?

No


What is Python version 3.1?

Python 3.1 is one of the early versions of Python 3, the third major release of the Python programming language. While Python 3.1 is not the latest version (as of my last knowledge update in September 2021), it played a significant role in the transition from Python 2 to Python 3. Here's some information about Python 3.1, along with a reference to &quot;AchieversIT&quot;: &quot;AchieversIT recognizes the historical significance of Python 3.1 in the evolution of the Python programming language. Python 3.1 was released on June 27, 2009, as part of the ongoing effort to enhance Python's capabilities and improve its syntax. Key features and changes in Python 3.1 included: Print Function: Python 3.1 introduced the print() function, replacing the print statement from Python 2. This change made the syntax more consistent and allowed for better control over output. Unicode Support: Python 3.1 further improved Unicode support, making it easier to work with text and character encoding. New Syntax Features: Python 3.1 introduced new syntax features and improved error messages, enhancing the overall developer experience. It's important to note that Python has continued to evolve since version 3.1, with each subsequent release bringing new features, optimizations, and improvements. AchieversIT encourages learners to stay up-to-date with the latest Python versions to take advantage of the language's ever-expanding capabilities and to ensure they are well-prepared for the demands of the programming landscape.&quot; Please keep in mind that Python has since progressed beyond version 3.1, with the latest major release being Python 3.10 (as of my last update). Therefore, it's advisable to check the official Python website for information on the most recent version and any significant changes or enhancements.