Science Olympiad



CODING CONTEST – SCIENCE OLYMPIADDESCRIPTION:This event will test a competitor’s competency in writing a computer program to solve a science problem (no points will be awarded for elegant solutions). Teams of students (a single student may enter if a team of two in not available) will develop and test their program on specified problems within a designated time limit.NUMBER OF PARTICIPANTS: 2APPROXIMATE TIME: 60 MinutesTHE COMPETITION:1. The programming language is TI-BASIC. TI-83, TI-84 (any variety), or TI-Nspire CX handhelds will be used. 2. Three science problems of a type not solvable on any ordinary non-programmable calculator and of varying difficulty will be presented to the teams. Necessary formulas will be provided. 3. A flow chart will be provided explaining how the program functions4. When the solutions are turned in, the teams must submit evidence of how they arrived at the solution to the problem (e.g. printed copy of the program, screen inspection or handwritten copy)Scoring:The teams which submit the correct solution to the problem in the short time period will determine the winners. The programs and flow charts will be judged on the basis of accuracy first and speed second. (The organizer, facilitator, grader can have each team sign a number paper when they submit their code. As the facilitator goes through the programs in order to determine if they function properly, they can go down the list in order of submissions. The facilitator will also have a digital copy of the program since the student will turn in the handheld they were using. The program will be named by the name of the team)Sample Problem – Division CMendelian genetics is often taught in middle and high school life science classes. The teacher explains that for a given monogenic trait, the probability of any offspring expressing an allele for that trait depends on if the alleles for that trait are dominant or recessive as well as the mother and father’s genotype for that trait. Your task is to write a program that will model the probability of the genotype for different alleles of a trait. The mother is heterozygous. The father is homozygous recessive. Use symbols B = dominant; b =recessive. Complete 500 crossings. The result should be displayed Sample code:"Let A = homozygous dominant (RED), B= heterozygous (GREEN), and C = homozygous recessive (BLUE)""Optionally use the Innovator Hub to display the phenotype of each cross"0→A0→B0→C"Set up the graph window to display the genotype histogram"1→Xscl1→Ymax0→Xmin7→Xmax0→Ymin110→YmaxBackgroundOffPlot1(Histogram,L?,L?)PlotsOn 1PlotsOff 2,3"Let 1 = dominant allele and 0 = recessive allele, the two alleles are stored in a list""The genotypes for mom and dad are dominant (1) and recessive (0), modify test values""for different types of crosses"{1,0}→?MOM{1,0}→?DAD"Run simulation for 500 mattings (crosses)For(N,1,500)"Law of Independent Assortment states that one of the two alleles from each parent is""randomly combined at fertilization. The code generates a random number either a 1 or 2.""These two random number M (mom) and D (dad) are then used as the pointers that index the list""for the two alleles form mom and data"randInt(1,2)→MrandInt(1,2)→D"Check the cross to see if it is homozygous dominant (1,1), if it is, count it in A":If ?MOM(M)=1 and ?DAD(D)=1:Then::A+1→A::Send("SET COLOR 255 0 0"):End"Check the cross to see if it is heterozygous (1,0) or (0,1), if it is, count it in B":If (?MOM(M)=1 and ?DAD(D)=0) or (?MOM(M)=0 and ?DAD(D)=1):Then::B+1→B::Send("SET COLOR 0 255 0"):End"Check the cross to see if it is heterozygous recessive (0,0), if it is, count it in C":If ?MOM(M)=0 and ?DAD(D)=0:Then::C+1→C::Send("SET COLOR 0 0 255"):EndClrHomeDisp " Number of Crosses",NDisp " % HOMOZYGOUS DOMINANT",(A/N)*100Disp " % HETEROZYGOUS",(B/N)*100Disp " % HOMOZYGOUS RECESSIVE",(C/N)*100{1,3,5}→L?{(A/N)*100,(B/N)*100,(C/N)*100}→L?Wait .5DispGraphWait .5End ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download