1 / 8

Create Your Own Nerd Bingo Card Generator in MATLAB

This MATLAB-based Nerd Bingo Card Generator allows users to generate unique bingo cards filled with random numbers. The board is initialized, with each cell filled with a unique number from 1 to 75. Users can pick numbers, and the program checks for called numbers and user responses. The generator reads member names for an interactive experience and ensures that numbers are placed without repetition. This is an ideal tool for events, gatherings, or educational purposes among students and enthusiasts alike!

africa
Télécharger la présentation

Create Your Own Nerd Bingo Card Generator in MATLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. nested loop to initiate Bingo board START k = 0; for i=1:5 0 1 0 for j=1:15 1 k = k + 1; board(j,i)=k; called(j,i)=0; END

  2. pick a “ball” from the Bingo board START pick = 0; 0 while pick == 0 1 pick_col = ceil(rand()*5); pick_row = ceil(rand()*15); number = board(pick_row, pick_col); if called(pick_row,pick_col) == 0 0 1 called(pick_row,pick_col)=number; pick = 1; END count = count + 1;

  3. check user response Y or N START response = 1; while response 0 1 check=input('Y/N\n','s'); 1 if check==Y|N 0 invalid input response = 0; END

  4. Nerd Bingo Card Generator DATA START READ 0 for k=1:n 1 ZEROS FILL PRINT END

  5. aiche.txt START members = textread() read member names n = size(members) READ names = strvcat(members) END

  6. fill card with zeros START ZEROS 0 for i=1:5 1 i=i+1 for j=1:5 0 1 j=j+1 card(j,i)=0 END card = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

  7. fill card with numbers FILL START bingo = 0; 0 for i=1:5 1 i=i+1 PRINT bingo = bingo + 15 for j=1:5 0 1 j=j+1 NMSU AIChE Student Chapter Official Nerd Bingo Card B I N G O 5 21 43 52 65 3 23 41 46 74 14 18 37 50 68 12 25 32 59 69 7 16 33 58 70 Polly Darton -------- cut here -------- PICK END

  8. place a number in position (i,j) without repetition START number = 1; PICK while number 0 1 number = bingo + ceil(rand()*15); if sum(card(:)==number)==0 0 1 card(i,j) = number; number = 0; END

More Related