SlideShare a Scribd company logo
1 of 2
Download to read offline
PYTHON: Lottery Number Generator
Question: Design a program that generates a seven-digit lottery number. The program should
generate seven random numbers, each in the range of 0 through 9, and assign each number to a
list element. Then write another loop that displays the content of the lsit.
What I have:
import random
def main():
#Create a list
numbers=[0]*7
#populate the list with random numbers
for index in range (7):
numbers [index]=random.randint(0,0)
#Display the random numbers
print ('Here are your lottery numbers:')
for index in range (7):
print(numbers[index],end='')
#Separate curent numbers from next number with commas.
STUCK HERE
main()
I'm stuck after that comment about separate current number from next number with commas. I
figured out a way already that works but I'd really like to understand this method. Thank you in
advance for all the help!!
Solution
#Start
def lotteryNo():
import random
integer = []
for number in range(0 , 7):
integer.append(random.randint(0, 9))
return integer
print 'The Lucky Winning Numbers Are {}'. format(lotteryNo())
print ' Thank You for playing'
#End
Please use this code.

More Related Content

Similar to PYTHON Lottery Number GeneratorQuestion Design a program that ge.pdf

Answer should be in MIPS please Please ensure you are follo.pdf
Answer should be in MIPS please Please ensure you are follo.pdfAnswer should be in MIPS please Please ensure you are follo.pdf
Answer should be in MIPS please Please ensure you are follo.pdfsales79
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdfYashMirge2
 
python_lab_manual_final (1).pdf
python_lab_manual_final (1).pdfpython_lab_manual_final (1).pdf
python_lab_manual_final (1).pdfkeerthu0442
 
Write an MASM program that meets the following requirements- Please us.pdf
Write an MASM program that meets the following requirements- Please us.pdfWrite an MASM program that meets the following requirements- Please us.pdf
Write an MASM program that meets the following requirements- Please us.pdfasarts99
 
Tutorial 04 (revised) (1)
Tutorial 04 (revised) (1)Tutorial 04 (revised) (1)
Tutorial 04 (revised) (1)IIUM
 
I need help getting my code to work (code is at the bottom)1.3.pdf
I need help getting my code to work (code is at the bottom)1.3.pdfI need help getting my code to work (code is at the bottom)1.3.pdf
I need help getting my code to work (code is at the bottom)1.3.pdfpratyushraj61
 
I need help getting my mips program completed this are the full inst.pdf
I need help getting my mips program completed this are the full inst.pdfI need help getting my mips program completed this are the full inst.pdf
I need help getting my mips program completed this are the full inst.pdfallurafashions98
 
Theatre Booking System Lesson 3
Theatre Booking System   Lesson 3Theatre Booking System   Lesson 3
Theatre Booking System Lesson 3mrbelshaw
 

Similar to PYTHON Lottery Number GeneratorQuestion Design a program that ge.pdf (15)

Answer should be in MIPS please Please ensure you are follo.pdf
Answer should be in MIPS please Please ensure you are follo.pdfAnswer should be in MIPS please Please ensure you are follo.pdf
Answer should be in MIPS please Please ensure you are follo.pdf
 
Sample Program file class 11.pdf
Sample Program file class 11.pdfSample Program file class 11.pdf
Sample Program file class 11.pdf
 
python_lab_manual_final (1).pdf
python_lab_manual_final (1).pdfpython_lab_manual_final (1).pdf
python_lab_manual_final (1).pdf
 
Write an MASM program that meets the following requirements- Please us.pdf
Write an MASM program that meets the following requirements- Please us.pdfWrite an MASM program that meets the following requirements- Please us.pdf
Write an MASM program that meets the following requirements- Please us.pdf
 
simple programs.docx
simple programs.docxsimple programs.docx
simple programs.docx
 
Tutorial 04 (revised) (1)
Tutorial 04 (revised) (1)Tutorial 04 (revised) (1)
Tutorial 04 (revised) (1)
 
I need help getting my code to work (code is at the bottom)1.3.pdf
I need help getting my code to work (code is at the bottom)1.3.pdfI need help getting my code to work (code is at the bottom)1.3.pdf
I need help getting my code to work (code is at the bottom)1.3.pdf
 
Chapter 7 rohith
Chapter 7 rohithChapter 7 rohith
Chapter 7 rohith
 
I need help getting my mips program completed this are the full inst.pdf
I need help getting my mips program completed this are the full inst.pdfI need help getting my mips program completed this are the full inst.pdf
I need help getting my mips program completed this are the full inst.pdf
 
Theatre Booking System Lesson 3
Theatre Booking System   Lesson 3Theatre Booking System   Lesson 3
Theatre Booking System Lesson 3
 
Number systems
Number systemsNumber systems
Number systems
 
Matlab project
Matlab projectMatlab project
Matlab project
 
xii cs practicals
xii cs practicalsxii cs practicals
xii cs practicals
 
Binary systemn
Binary systemnBinary systemn
Binary systemn
 
Programs.doc
Programs.docPrograms.doc
Programs.doc
 

More from izabellejaeden956

Explain the advantages and disadvantages of misuse-based and anomaly.pdf
Explain the advantages and disadvantages of misuse-based and anomaly.pdfExplain the advantages and disadvantages of misuse-based and anomaly.pdf
Explain the advantages and disadvantages of misuse-based and anomaly.pdfizabellejaeden956
 
E. coli takes up plasmid DNA by which of the following methodsple.pdf
E. coli takes up plasmid DNA by which of the following methodsple.pdfE. coli takes up plasmid DNA by which of the following methodsple.pdf
E. coli takes up plasmid DNA by which of the following methodsple.pdfizabellejaeden956
 
Consider the two genes described in Question 7. What is the probabili.pdf
Consider the two genes described in Question 7. What is the probabili.pdfConsider the two genes described in Question 7. What is the probabili.pdf
Consider the two genes described in Question 7. What is the probabili.pdfizabellejaeden956
 
A wireless technology that may someday replace barcodes through the u.pdf
A wireless technology that may someday replace barcodes through the u.pdfA wireless technology that may someday replace barcodes through the u.pdf
A wireless technology that may someday replace barcodes through the u.pdfizabellejaeden956
 
The director of special events for Sun City believed that he amount o.pdf
The director of special events for Sun City believed that he amount o.pdfThe director of special events for Sun City believed that he amount o.pdf
The director of special events for Sun City believed that he amount o.pdfizabellejaeden956
 
Write an application containing three parallel arrays that hold 10 e.pdf
Write an application containing three parallel arrays that hold 10 e.pdfWrite an application containing three parallel arrays that hold 10 e.pdf
Write an application containing three parallel arrays that hold 10 e.pdfizabellejaeden956
 
Which type of project risk is the most relevantStand-alone risk.pdf
Which type of project risk is the most relevantStand-alone risk.pdfWhich type of project risk is the most relevantStand-alone risk.pdf
Which type of project risk is the most relevantStand-alone risk.pdfizabellejaeden956
 
Which of the following is an advantage businesses have over citizens.pdf
Which of the following is an advantage businesses have over citizens.pdfWhich of the following is an advantage businesses have over citizens.pdf
Which of the following is an advantage businesses have over citizens.pdfizabellejaeden956
 
what is the pseudoautosomal regionA. the region on the Y chromose.pdf
what is the pseudoautosomal regionA. the region on the Y chromose.pdfwhat is the pseudoautosomal regionA. the region on the Y chromose.pdf
what is the pseudoautosomal regionA. the region on the Y chromose.pdfizabellejaeden956
 
What is a flat file database How can it be used for forecasting.pdf
What is a flat file database How can it be used for forecasting.pdfWhat is a flat file database How can it be used for forecasting.pdf
What is a flat file database How can it be used for forecasting.pdfizabellejaeden956
 
What is, in your opinion, the minimum firewall placement for a SCADA.pdf
What is, in your opinion, the minimum firewall placement for a SCADA.pdfWhat is, in your opinion, the minimum firewall placement for a SCADA.pdf
What is, in your opinion, the minimum firewall placement for a SCADA.pdfizabellejaeden956
 
What factor(s) do not contribute to the development of mutations tha.pdf
What factor(s) do not contribute to the development of mutations tha.pdfWhat factor(s) do not contribute to the development of mutations tha.pdf
What factor(s) do not contribute to the development of mutations tha.pdfizabellejaeden956
 
Urinary Tract infections commonly caused by E. Coli is a common illn.pdf
Urinary Tract infections commonly caused by E. Coli is a common illn.pdfUrinary Tract infections commonly caused by E. Coli is a common illn.pdf
Urinary Tract infections commonly caused by E. Coli is a common illn.pdfizabellejaeden956
 
Two samples of sizes 15 and 20 are randomly and independently select.pdf
Two samples of sizes 15 and 20 are randomly and independently select.pdfTwo samples of sizes 15 and 20 are randomly and independently select.pdf
Two samples of sizes 15 and 20 are randomly and independently select.pdfizabellejaeden956
 
True or False The Coefficient of Determination shows the direction .pdf
True or False The Coefficient of Determination shows the direction .pdfTrue or False The Coefficient of Determination shows the direction .pdf
True or False The Coefficient of Determination shows the direction .pdfizabellejaeden956
 
Mechanical Engineer    A technology that had being since the last .pdf
Mechanical Engineer    A technology that had being since the last .pdfMechanical Engineer    A technology that had being since the last .pdf
Mechanical Engineer    A technology that had being since the last .pdfizabellejaeden956
 
The following transactions occurred for London Engineering O (Click .pdf
The following transactions occurred for London Engineering O (Click .pdfThe following transactions occurred for London Engineering O (Click .pdf
The following transactions occurred for London Engineering O (Click .pdfizabellejaeden956
 
Regulation of prokaryotic gene expression is simpler than that in eu.pdf
Regulation of prokaryotic gene expression is simpler than that in eu.pdfRegulation of prokaryotic gene expression is simpler than that in eu.pdf
Regulation of prokaryotic gene expression is simpler than that in eu.pdfizabellejaeden956
 
Q4. We used remote port forwarding in this scenario. How does local .pdf
Q4. We used remote port forwarding in this scenario. How does local .pdfQ4. We used remote port forwarding in this scenario. How does local .pdf
Q4. We used remote port forwarding in this scenario. How does local .pdfizabellejaeden956
 
policy instrumens.Hi,can I get helpI choose policy instruments a.pdf
policy instrumens.Hi,can I get helpI choose policy instruments a.pdfpolicy instrumens.Hi,can I get helpI choose policy instruments a.pdf
policy instrumens.Hi,can I get helpI choose policy instruments a.pdfizabellejaeden956
 

More from izabellejaeden956 (20)

Explain the advantages and disadvantages of misuse-based and anomaly.pdf
Explain the advantages and disadvantages of misuse-based and anomaly.pdfExplain the advantages and disadvantages of misuse-based and anomaly.pdf
Explain the advantages and disadvantages of misuse-based and anomaly.pdf
 
E. coli takes up plasmid DNA by which of the following methodsple.pdf
E. coli takes up plasmid DNA by which of the following methodsple.pdfE. coli takes up plasmid DNA by which of the following methodsple.pdf
E. coli takes up plasmid DNA by which of the following methodsple.pdf
 
Consider the two genes described in Question 7. What is the probabili.pdf
Consider the two genes described in Question 7. What is the probabili.pdfConsider the two genes described in Question 7. What is the probabili.pdf
Consider the two genes described in Question 7. What is the probabili.pdf
 
A wireless technology that may someday replace barcodes through the u.pdf
A wireless technology that may someday replace barcodes through the u.pdfA wireless technology that may someday replace barcodes through the u.pdf
A wireless technology that may someday replace barcodes through the u.pdf
 
The director of special events for Sun City believed that he amount o.pdf
The director of special events for Sun City believed that he amount o.pdfThe director of special events for Sun City believed that he amount o.pdf
The director of special events for Sun City believed that he amount o.pdf
 
Write an application containing three parallel arrays that hold 10 e.pdf
Write an application containing three parallel arrays that hold 10 e.pdfWrite an application containing three parallel arrays that hold 10 e.pdf
Write an application containing three parallel arrays that hold 10 e.pdf
 
Which type of project risk is the most relevantStand-alone risk.pdf
Which type of project risk is the most relevantStand-alone risk.pdfWhich type of project risk is the most relevantStand-alone risk.pdf
Which type of project risk is the most relevantStand-alone risk.pdf
 
Which of the following is an advantage businesses have over citizens.pdf
Which of the following is an advantage businesses have over citizens.pdfWhich of the following is an advantage businesses have over citizens.pdf
Which of the following is an advantage businesses have over citizens.pdf
 
what is the pseudoautosomal regionA. the region on the Y chromose.pdf
what is the pseudoautosomal regionA. the region on the Y chromose.pdfwhat is the pseudoautosomal regionA. the region on the Y chromose.pdf
what is the pseudoautosomal regionA. the region on the Y chromose.pdf
 
What is a flat file database How can it be used for forecasting.pdf
What is a flat file database How can it be used for forecasting.pdfWhat is a flat file database How can it be used for forecasting.pdf
What is a flat file database How can it be used for forecasting.pdf
 
What is, in your opinion, the minimum firewall placement for a SCADA.pdf
What is, in your opinion, the minimum firewall placement for a SCADA.pdfWhat is, in your opinion, the minimum firewall placement for a SCADA.pdf
What is, in your opinion, the minimum firewall placement for a SCADA.pdf
 
What factor(s) do not contribute to the development of mutations tha.pdf
What factor(s) do not contribute to the development of mutations tha.pdfWhat factor(s) do not contribute to the development of mutations tha.pdf
What factor(s) do not contribute to the development of mutations tha.pdf
 
Urinary Tract infections commonly caused by E. Coli is a common illn.pdf
Urinary Tract infections commonly caused by E. Coli is a common illn.pdfUrinary Tract infections commonly caused by E. Coli is a common illn.pdf
Urinary Tract infections commonly caused by E. Coli is a common illn.pdf
 
Two samples of sizes 15 and 20 are randomly and independently select.pdf
Two samples of sizes 15 and 20 are randomly and independently select.pdfTwo samples of sizes 15 and 20 are randomly and independently select.pdf
Two samples of sizes 15 and 20 are randomly and independently select.pdf
 
True or False The Coefficient of Determination shows the direction .pdf
True or False The Coefficient of Determination shows the direction .pdfTrue or False The Coefficient of Determination shows the direction .pdf
True or False The Coefficient of Determination shows the direction .pdf
 
Mechanical Engineer    A technology that had being since the last .pdf
Mechanical Engineer    A technology that had being since the last .pdfMechanical Engineer    A technology that had being since the last .pdf
Mechanical Engineer    A technology that had being since the last .pdf
 
The following transactions occurred for London Engineering O (Click .pdf
The following transactions occurred for London Engineering O (Click .pdfThe following transactions occurred for London Engineering O (Click .pdf
The following transactions occurred for London Engineering O (Click .pdf
 
Regulation of prokaryotic gene expression is simpler than that in eu.pdf
Regulation of prokaryotic gene expression is simpler than that in eu.pdfRegulation of prokaryotic gene expression is simpler than that in eu.pdf
Regulation of prokaryotic gene expression is simpler than that in eu.pdf
 
Q4. We used remote port forwarding in this scenario. How does local .pdf
Q4. We used remote port forwarding in this scenario. How does local .pdfQ4. We used remote port forwarding in this scenario. How does local .pdf
Q4. We used remote port forwarding in this scenario. How does local .pdf
 
policy instrumens.Hi,can I get helpI choose policy instruments a.pdf
policy instrumens.Hi,can I get helpI choose policy instruments a.pdfpolicy instrumens.Hi,can I get helpI choose policy instruments a.pdf
policy instrumens.Hi,can I get helpI choose policy instruments a.pdf
 

Recently uploaded

Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxAmita Gupta
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 

Recently uploaded (20)

Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Third Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptxThird Battle of Panipat detailed notes.pptx
Third Battle of Panipat detailed notes.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 

PYTHON Lottery Number GeneratorQuestion Design a program that ge.pdf

  • 1. PYTHON: Lottery Number Generator Question: Design a program that generates a seven-digit lottery number. The program should generate seven random numbers, each in the range of 0 through 9, and assign each number to a list element. Then write another loop that displays the content of the lsit. What I have: import random def main(): #Create a list numbers=[0]*7 #populate the list with random numbers for index in range (7): numbers [index]=random.randint(0,0) #Display the random numbers print ('Here are your lottery numbers:') for index in range (7): print(numbers[index],end='') #Separate curent numbers from next number with commas. STUCK HERE main() I'm stuck after that comment about separate current number from next number with commas. I figured out a way already that works but I'd really like to understand this method. Thank you in advance for all the help!! Solution #Start def lotteryNo(): import random integer = [] for number in range(0 , 7): integer.append(random.randint(0, 9)) return integer
  • 2. print 'The Lucky Winning Numbers Are {}'. format(lotteryNo()) print ' Thank You for playing' #End Please use this code.