5.18. Prime Number List - Python

preview_player
Показать описание
-----------------------------------------------------------------------------------------------------
Starting out with Python, Third Edition, Tony Gaddis
Chapter 5
Programming Challenges
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
18. Prime Number List

This exercise assumes that you have already written the is_prime function in programming Exercise 17. Write another program that displays all of the prime numbers from 1 to 100. The program should have a loop that calls the is_prime function.

Starting out with Python. Third Edition. Tony Gaddis.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bitcoin Address - 1AbnaHDLG3xqmycNHKDKh1gPNst29Rkp6S

Thanks :)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Рекомендации по теме
Комментарии
Автор

Thank you SO MUCH for this! I was having a difficult time with this and you explained it wonderfully.

tiffanyleszcynski
Автор

Hi Kakra!
Please make video on checking prime number in a list

flashgaming
Автор

Thanks, how could you make it to count the number of prime numbers displayed?

loganhawkins
Автор

how would you make it so that the string of numbers is printed vertically rather than horizontally

kevinhernandez
Автор

Hi, what should i do if i wanna print out ' Prime numbers from 1 to 100 are: i tried putting this in the print and it gave me Prime numbers from 1 to 100 are: 2 Prime numbers from 1 to 100 are: 3 Prime numbers from 1 to 100 are: 5 Prime numbers from 1 to 100 are: 7. How do i make the print statement once but have all the prime numbers?

piglink