Question Description
I'm working on a python question and need an explanation and answer to help me learn.
Create button in python? Required coding?

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.
Explanation & Answer

View attached ex...

Cebs_Hfnzn
(186)
Boston College
Completion Status:
100%
Review
Review

Anonymous
Really useful study material!

Studypool
4.7

Trustpilot
4.5

Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content

EGRE 336 Harvard University Communication Systems Matlab Questions
1. Single m file, with a pause statement after each pop up plot window. On completion of the run, both windows should stil ...
EGRE 336 Harvard University Communication Systems Matlab Questions
1. Single m file, with a pause statement after each pop up plot window. On completion of the run, both windows should still be displayed. 2. PDF of the plots for each pop-up window. (total of 2 pages) 3. Name your file first-name.m (example: john-doe.m)

IFT 1170 Blackburn College java Programming and Software Engineering Paper
Question is about Java And its Applications. All the requirements and task files are attached. kinldy have a look
IFT 1170 Blackburn College java Programming and Software Engineering Paper
Question is about Java And its Applications. All the requirements and task files are attached. kinldy have a look

A java program rewrite with solution
This assignment is built using the code from Assignment 5.In this assignment create a separate serialized file using Objec ...
A java program rewrite with solution
This assignment is built using the code from Assignment 5.In this assignment create a separate serialized file using ObjectOutputStream for each student.File should contain student's score and statistics for entire class.Using debug mode (with Debug flag) print the contents of the serialized file.Print student statistics.Print scores for a given student id.implement the Debug flag globallyComplete Program:// Student.javaimport java.io.Serializable;public class Student implements Serializable{private int Stud;private int Qu1;private int Qu2;private int Qu3;private int Qu4;private int Qu5; public Student(int stud, int qu1, int qu2, int qu3, int qu4, int qu5){Stud = stud;Qu1 = qu1;Qu2 = qu2;Qu3 = qu3;Qu4 = qu4;Qu5 = qu5;}public int getStud(){return Stud;}public void setStud(int stud){Stud = stud;}public int getQu1(){return Qu1;}public void setQu1(int qu1){Qu1 = qu1;}public int getQu2(){return Qu2;}public void setQu2(int qu2){Qu2 = qu2;}public int getQu3(){return Qu3;}public void setQu3(int qu3){Qu3 = qu3;}public int getQu4(){return Qu4;}public void setQu4(int qu4){Qu4 = qu4;}public int getQu5(){return Qu5;}public void setQu5(int qu5){Qu5 = qu5;} public String toString(){return Stud + " " + Qu1 + " " + Qu2 + " " + Qu3 + " " + Qu4 + " " + Qu5;}}// StudentTest.javaimport java.io.*;public class StudentTest{public static final long serialVersionUID = 42L;public static void main(String[] args) throws IOException,ClassNotFoundException{Student[] students = new Student[15];students[0] = new Student(1234, 52, 7, 100, 78, 34);students[1] = new Student(2134, 90, 36, 90, 77, 30);students[2] = new Student(3124, 100, 45, 20, 90, 70);students[3] = new Student(4532, 11, 17, 81, 32, 77);students[4] = new Student(5678, 20, 12, 45, 78, 34);students[5] = new Student(6134, 34, 80, 55, 78, 45);students[6] = new Student(7874, 60, 100, 56, 78, 78);students[7] = new Student(8026, 70, 10, 66, 78, 56);students[8] = new Student(9893, 34, 9, 77, 78, 20);students[9] = new Student(1947, 45, 40, 88, 78, 55);students[10] = new Student(2877, 55, 50, 99, 78, 80);students[11] = new Student(3189, 22, 70, 100, 78, 77);students[12] = new Student(4602, 89, 50, 91, 78, 60);students[13] = new Student(5405, 11, 11, 0, 78, 10);students[14] = new Student(6999, 0, 98, 89, 78, 20);FileOutputStream fos = new FileOutputStream("scores.txt");ObjectOutputStream oos = new ObjectOutputStream(fos);for(int i = 0; i < students.length; i++){oos.writeObject(students[i]);}oos.close();fos.close();int count = 0;int max1 = 0, min1 = 0; double sum1 = 0;int max2 = 0, min2 = 0; double sum2 = 0;int max3 = 0, min3 = 0; double sum3 = 0;int max4 = 0, min4 = 0; double sum4 = 0;int max5 = 0, min5 = 0; double sum5 = 0; FileInputStream fis = new FileInputStream("scores.txt");ObjectInputStream ois = new ObjectInputStream(fis);while(true){try{Student st = (Student)ois.readObject();count++; if(count == 1){max1 = st.getQu1();min1 = st.getQu1(); max2 = st.getQu2();min2 = st.getQu2(); max3 = st.getQu3();min3 = st.getQu3(); max4 = st.getQu4();min4 = st.getQu4(); max5 = st.getQu5();min5 = st.getQu5();}else{if(st.getQu1() > max1)max1 = st.getQu1(); if(st.getQu2() > max2)max2 = st.getQu2(); if(st.getQu3() > max3)max3 = st.getQu3(); if(st.getQu4() > max4)max4 = st.getQu4(); if(st.getQu5() > max5)max5 = st.getQu5(); if(st.getQu1() < min1)min1 = st.getQu1(); if(st.getQu2() < min2)min2 = st.getQu2(); if(st.getQu3() < min3)min3 = st.getQu3(); if(st.getQu4() < min4)min4 = st.getQu4(); if(st.getQu5() < min5)min5 = st.getQu5();} sum1 += st.getQu1();sum2 += st.getQu2();sum3 += st.getQu3();sum4 += st.getQu4();sum5 += st.getQu5();}catch(EOFException e){break;}}ois.close();fis.close(); System.out.printf("%-12s%6d%6d%6d%6d%6d\n", "High Score", max1, max2, max3, max4, max5);System.out.printf("%-12s%6d%6d%6d%6d%6d\n", "Low Score", min1, min2, min3, min5, min5);System.out.printf("%-12s%6.1f%6.1f%6.1f%6.1f%6.1f\n", "Average", sum1/count, sum2/count, sum3/count, sum4/count, sum5/count);}}

Linux C/C+ adding checks for semantic errors 😀
Here are the instructions below however please see the attached files 😀The fourth project involves modifying the semant ...
Linux C/C+ adding checks for semantic errors 😀
Here are the instructions below however please see the attached files 😀The fourth project involves modifying the semantic analyzer for the attached compiler by adding checks for semantic errors. The static semantic rules of this language are the following:Variables and parameter names have local scope. The scope rules require that all names be declared and prohibit duplicate names within the same scope. The type correspondence rules are as follows: Boolean expressions cannot be used with arithmetic or relational operators. Arithmetic expressions cannot be used with logical operators. Reductions can only contain numeric types. Only integer operands can be used with the remainder operator. The two statements in an if statement must match in type. No coercion is performed. All the statements in a case statement must match in type. No coercion is performed. The type of the if expression must be Boolean. The type of the case expression must be Integer A narrowing variable initialization or function return occurs when a real value is being forced into integer. Widening is permitted. Boolean types cannot be mixed with numeric types in variable initializations or function returns.Type coercion from an integer to a real type is performed within arithmetic expressions.You must make the following semantic checks. Those highlighted in yellow are already performed by the code that you have been provided, although you are must make minor modifications to account for the addition of real types and the need to perform type coercion and to handle the additional arithmetic and logical operators. Using Boolean Expressions with Arithmetic Operator Using Boolean Expressions with Relational Operator Using Arithmetic Expressions with Logical Operator Reductions containing nonnumeric types Remainder Operator Requires Integer Operands If-Then Type Mismatch Case Types Mismatch If Condition Not Boolean Case Expression Not Integer Narrowing Variable Initialization Variable Initialization Mismatch Undeclared Variable Duplicate Variable Narrowing Function ReturnThis project requires modification to the bison input file, so that it defines the additional semantic checks necessary to produce these errors and addition of functions to the library of type checking functions already provided in types.cc. You must also make some modifications to the functions provided. You need to add a check to the checkAssignment function for mismatched types in the case that Boolean and numeric types are mixed. You need to also add code to the checkArithmetic function to coerce integers to reals when the types are mixed and the error message must be modified to indicate that numeric rather than only integer types are permitted.The provided code includes a template class Symbols that defines the symbol table. It already includes a check for undeclared identifiers. You need to add a check for duplicate identifiers.Like the lexical and syntax errors, the compiler should display the semantic errors in the compilation listing, after the line in which they occur. An example of compilation listing output containing semantic errors is shown below:1 -- Test of Multiple Semantic Errors 2 3 function test a: integer returns integer; 4 b: integer is 5 if a + 5 then 6 2; 7 else 8 5; 9 endif; Semantic Error, If Expression Must Be Boolean 10 c: real is 9.8 - 2 + 8; 11 d: boolean is 7 = f; Semantic Error, Undeclared f 12 begin 13 case b is 14 when 1 => 4.5 + c; 15 when 2 => b; Semantic Error, Case Types Mismatch 16 others => c; 17 endcase; 18 end; Lexical Errors 0 Syntax Errors 0 Semantic Errors 3You are to submit two files.1. The first is a .zip file that contains all the source code for the project. The .zip file should contain the flex input file, which should be a .l file, the bison file, which should be a .y file, all .cc and .h files and a makefile that builds the project.2. The second is a Word document (PDF or RTF is also acceptable) that contains the documentation for the project, which should include the following:a. A discussion of how you approached the projectb. A test plan that includes test cases that you have created indicating what aspects of the program each one is testing and a screen shot of your compiler run on that test casec. A discussion of lessons learned from the project and any improvements that could be mademe, project, date and code description not included in each file (0)
Similar Content
SEO page 137 #2
SEO page 137 #2SEO page 137 #2Define SEO and then complete the assignment in the book answering the questions using MLA fo...
Java coding
if want to coding about a customer details or inward material or issues material how can i do start coding in JAVA ?please...
Discussion questions
The syslogd daemon maintains logfiles on Linux distribution. Discuss how you would use the syslogd daemon to maintain a...
CMPS 285 RC The Android Lifecycle Studio Custom Spinner Project
Custom Spinner & Lifecycle Project
This project will focus your understanding of spinners, adapters, and your understa...
University of Central Florida Familiarization App in Java Application Project
Java Familiarization Assignment
Assignment Scope
1. Netbeans IDE familiarity
2. Create a Java console project
3. Create a ...
the python 3.5, programming homework help
Hello,I attached my assignment and also the file " Stack class" with the python 3.5if you have any question before you beg...
Related Tags
Book Guides
Death on the Nile
by Agatha Christie
Dead Poets Society
by Nancy Horowitz Kleinbaum
Pride and Prejudice
by Jane Austen
Fast Food Nation
by Eric Schlosser
Little Fires Everywhere
by Celeste Ng
Broke Millennial: Stop Scraping by and Get Your Financial Life Together
by Erin Lowry
Frankenstein
by Mary Shelley
Where'd You Go Bernadette
by Maria Semple
To the Lighthouse
by Virginia Woolf

Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content

EGRE 336 Harvard University Communication Systems Matlab Questions
1. Single m file, with a pause statement after each pop up plot window. On completion of the run, both windows should stil ...
EGRE 336 Harvard University Communication Systems Matlab Questions
1. Single m file, with a pause statement after each pop up plot window. On completion of the run, both windows should still be displayed. 2. PDF of the plots for each pop-up window. (total of 2 pages) 3. Name your file first-name.m (example: john-doe.m)

IFT 1170 Blackburn College java Programming and Software Engineering Paper
Question is about Java And its Applications. All the requirements and task files are attached. kinldy have a look
IFT 1170 Blackburn College java Programming and Software Engineering Paper
Question is about Java And its Applications. All the requirements and task files are attached. kinldy have a look

A java program rewrite with solution
This assignment is built using the code from Assignment 5.In this assignment create a separate serialized file using Objec ...
A java program rewrite with solution
This assignment is built using the code from Assignment 5.In this assignment create a separate serialized file using ObjectOutputStream for each student.File should contain student's score and statistics for entire class.Using debug mode (with Debug flag) print the contents of the serialized file.Print student statistics.Print scores for a given student id.implement the Debug flag globallyComplete Program:// Student.javaimport java.io.Serializable;public class Student implements Serializable{private int Stud;private int Qu1;private int Qu2;private int Qu3;private int Qu4;private int Qu5; public Student(int stud, int qu1, int qu2, int qu3, int qu4, int qu5){Stud = stud;Qu1 = qu1;Qu2 = qu2;Qu3 = qu3;Qu4 = qu4;Qu5 = qu5;}public int getStud(){return Stud;}public void setStud(int stud){Stud = stud;}public int getQu1(){return Qu1;}public void setQu1(int qu1){Qu1 = qu1;}public int getQu2(){return Qu2;}public void setQu2(int qu2){Qu2 = qu2;}public int getQu3(){return Qu3;}public void setQu3(int qu3){Qu3 = qu3;}public int getQu4(){return Qu4;}public void setQu4(int qu4){Qu4 = qu4;}public int getQu5(){return Qu5;}public void setQu5(int qu5){Qu5 = qu5;} public String toString(){return Stud + " " + Qu1 + " " + Qu2 + " " + Qu3 + " " + Qu4 + " " + Qu5;}}// StudentTest.javaimport java.io.*;public class StudentTest{public static final long serialVersionUID = 42L;public static void main(String[] args) throws IOException,ClassNotFoundException{Student[] students = new Student[15];students[0] = new Student(1234, 52, 7, 100, 78, 34);students[1] = new Student(2134, 90, 36, 90, 77, 30);students[2] = new Student(3124, 100, 45, 20, 90, 70);students[3] = new Student(4532, 11, 17, 81, 32, 77);students[4] = new Student(5678, 20, 12, 45, 78, 34);students[5] = new Student(6134, 34, 80, 55, 78, 45);students[6] = new Student(7874, 60, 100, 56, 78, 78);students[7] = new Student(8026, 70, 10, 66, 78, 56);students[8] = new Student(9893, 34, 9, 77, 78, 20);students[9] = new Student(1947, 45, 40, 88, 78, 55);students[10] = new Student(2877, 55, 50, 99, 78, 80);students[11] = new Student(3189, 22, 70, 100, 78, 77);students[12] = new Student(4602, 89, 50, 91, 78, 60);students[13] = new Student(5405, 11, 11, 0, 78, 10);students[14] = new Student(6999, 0, 98, 89, 78, 20);FileOutputStream fos = new FileOutputStream("scores.txt");ObjectOutputStream oos = new ObjectOutputStream(fos);for(int i = 0; i < students.length; i++){oos.writeObject(students[i]);}oos.close();fos.close();int count = 0;int max1 = 0, min1 = 0; double sum1 = 0;int max2 = 0, min2 = 0; double sum2 = 0;int max3 = 0, min3 = 0; double sum3 = 0;int max4 = 0, min4 = 0; double sum4 = 0;int max5 = 0, min5 = 0; double sum5 = 0; FileInputStream fis = new FileInputStream("scores.txt");ObjectInputStream ois = new ObjectInputStream(fis);while(true){try{Student st = (Student)ois.readObject();count++; if(count == 1){max1 = st.getQu1();min1 = st.getQu1(); max2 = st.getQu2();min2 = st.getQu2(); max3 = st.getQu3();min3 = st.getQu3(); max4 = st.getQu4();min4 = st.getQu4(); max5 = st.getQu5();min5 = st.getQu5();}else{if(st.getQu1() > max1)max1 = st.getQu1(); if(st.getQu2() > max2)max2 = st.getQu2(); if(st.getQu3() > max3)max3 = st.getQu3(); if(st.getQu4() > max4)max4 = st.getQu4(); if(st.getQu5() > max5)max5 = st.getQu5(); if(st.getQu1() < min1)min1 = st.getQu1(); if(st.getQu2() < min2)min2 = st.getQu2(); if(st.getQu3() < min3)min3 = st.getQu3(); if(st.getQu4() < min4)min4 = st.getQu4(); if(st.getQu5() < min5)min5 = st.getQu5();} sum1 += st.getQu1();sum2 += st.getQu2();sum3 += st.getQu3();sum4 += st.getQu4();sum5 += st.getQu5();}catch(EOFException e){break;}}ois.close();fis.close(); System.out.printf("%-12s%6d%6d%6d%6d%6d\n", "High Score", max1, max2, max3, max4, max5);System.out.printf("%-12s%6d%6d%6d%6d%6d\n", "Low Score", min1, min2, min3, min5, min5);System.out.printf("%-12s%6.1f%6.1f%6.1f%6.1f%6.1f\n", "Average", sum1/count, sum2/count, sum3/count, sum4/count, sum5/count);}}

Linux C/C+ adding checks for semantic errors 😀
Here are the instructions below however please see the attached files 😀The fourth project involves modifying the semant ...
Linux C/C+ adding checks for semantic errors 😀
Here are the instructions below however please see the attached files 😀The fourth project involves modifying the semantic analyzer for the attached compiler by adding checks for semantic errors. The static semantic rules of this language are the following:Variables and parameter names have local scope. The scope rules require that all names be declared and prohibit duplicate names within the same scope. The type correspondence rules are as follows: Boolean expressions cannot be used with arithmetic or relational operators. Arithmetic expressions cannot be used with logical operators. Reductions can only contain numeric types. Only integer operands can be used with the remainder operator. The two statements in an if statement must match in type. No coercion is performed. All the statements in a case statement must match in type. No coercion is performed. The type of the if expression must be Boolean. The type of the case expression must be Integer A narrowing variable initialization or function return occurs when a real value is being forced into integer. Widening is permitted. Boolean types cannot be mixed with numeric types in variable initializations or function returns.Type coercion from an integer to a real type is performed within arithmetic expressions.You must make the following semantic checks. Those highlighted in yellow are already performed by the code that you have been provided, although you are must make minor modifications to account for the addition of real types and the need to perform type coercion and to handle the additional arithmetic and logical operators. Using Boolean Expressions with Arithmetic Operator Using Boolean Expressions with Relational Operator Using Arithmetic Expressions with Logical Operator Reductions containing nonnumeric types Remainder Operator Requires Integer Operands If-Then Type Mismatch Case Types Mismatch If Condition Not Boolean Case Expression Not Integer Narrowing Variable Initialization Variable Initialization Mismatch Undeclared Variable Duplicate Variable Narrowing Function ReturnThis project requires modification to the bison input file, so that it defines the additional semantic checks necessary to produce these errors and addition of functions to the library of type checking functions already provided in types.cc. You must also make some modifications to the functions provided. You need to add a check to the checkAssignment function for mismatched types in the case that Boolean and numeric types are mixed. You need to also add code to the checkArithmetic function to coerce integers to reals when the types are mixed and the error message must be modified to indicate that numeric rather than only integer types are permitted.The provided code includes a template class Symbols that defines the symbol table. It already includes a check for undeclared identifiers. You need to add a check for duplicate identifiers.Like the lexical and syntax errors, the compiler should display the semantic errors in the compilation listing, after the line in which they occur. An example of compilation listing output containing semantic errors is shown below:1 -- Test of Multiple Semantic Errors 2 3 function test a: integer returns integer; 4 b: integer is 5 if a + 5 then 6 2; 7 else 8 5; 9 endif; Semantic Error, If Expression Must Be Boolean 10 c: real is 9.8 - 2 + 8; 11 d: boolean is 7 = f; Semantic Error, Undeclared f 12 begin 13 case b is 14 when 1 => 4.5 + c; 15 when 2 => b; Semantic Error, Case Types Mismatch 16 others => c; 17 endcase; 18 end; Lexical Errors 0 Syntax Errors 0 Semantic Errors 3You are to submit two files.1. The first is a .zip file that contains all the source code for the project. The .zip file should contain the flex input file, which should be a .l file, the bison file, which should be a .y file, all .cc and .h files and a makefile that builds the project.2. The second is a Word document (PDF or RTF is also acceptable) that contains the documentation for the project, which should include the following:a. A discussion of how you approached the projectb. A test plan that includes test cases that you have created indicating what aspects of the program each one is testing and a screen shot of your compiler run on that test casec. A discussion of lessons learned from the project and any improvements that could be mademe, project, date and code description not included in each file (0)
Earn money selling
your Study Documents