Write a program to read 50 students’ marks, calculate and print the number of students who succeed and the number of students who failed (any marks below 40 should be considered failed).

Member Avatar
Member Avatar
+0 forum 4

I am creating a program in python for a artificial intelligence for chinese checkers, but i cant even get the board to be portrayed! I am using this code: `Code` from tkinter import * root = Tk() board = PhotoImage(file="board.ppm") root.mainloop() I get the error as follows: Traceback (most recent call last): File "/Users/GAMEKNIGHT7/Documents/chineseCheckersAI(genius hour).py", line 3, in <module> board = PhotoImage(file="board.ppm") File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 3539, in __init__ Image.__init__(self, 'photo', name, cnf, master, **kw) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 3495, in __init__ self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't open "board.ppm": no such file or directory What happened??`

Member Avatar
Member Avatar
+0 forum 1

I am trying to implement a MIPS code that preforms unsigned integer divide but i couldn't figure out how. if D == 0, report an error and terminate. Q = 0 # Q is the quotient, initialized to zero R = 0 # R is the remainder, also initialized to zero n = the number of bits in the numerator N # That is, the number 3710 is 1001012 has 6 bits. # Shift through the bits of N to find the # position of its most significant 1 bit. # Write a separate function to determine “n”. for i …

Member Avatar
Member Avatar
+0 forum 1

i have 2 sperate projects which i am trying to run together as a shared project but i am failing hard……. Basically, first project does infix to postfix notation and the second projects does postfix evaluation. tried to run all that in 1 project but i keep getting all sorts of error and cannot figure it out, I am kind of lost don’t know what to do. any suggestions would be really appreciated!!!!!!!!! the first 3 files is infix to postfix project and the last one is posftix evaluation. this is the calculator.cpp #include "stdafx.h" #include "Calculator.h" #include <iostream> #include …

Member Avatar
Member Avatar
+0 forum 6

[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to read : "); fflush(stdin); scanf("%s",fname->data); fptr=fopen(fname->data,"rb"); if(fptr == NULL) { perror("Could not open the file "); return; } printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("Contents of the file %s are : ",fname->data); [B] while(fread(&fname, sizeof(data_t), 1,fptr) == 1) { // what do I put here? }[/B] fclose(fptr); return 0; } [/CODE] I want to read …

Member Avatar
Member Avatar
+0 forum 11

I'm trying to initialize var altitude. init(altitude: CLLocationDistance) { self.altitude = altitude super.init(nibName: nil, bundle: nil) } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } But it gives me an error: Property 'self.altitude' not initialized at super.init call Thanks

Member Avatar
+0 forum 0

I need to write a program that reads data from a text file, and prints it. These are the specifications. And then manipulate the program to determine this: -The number of uppercase letters in the file -The number of lowercase letters in the file -The number of digits in the file -The number of whitespace characters in the file I really need help doing this, it has to pertain to strings, but also basic concepts of Python. Im at a begginners skill level, and Im stuck. Much help would be GREATLY appreciated, thank you!

Member Avatar
Member Avatar
+0 forum 5

Hi there! I hope I'm putting this in the correct section... Recently I though of the idea of "building" something for me. As you may guess for the title, I want to create an email client and I know there are a lot nowadays but either because of limitations or graphic design I want to do one by my own and for myself. And maybe in the future I would release it as an app for the web, desktop and/or mobile. What I can't decide is what language(s) and/or framework(s) I should use to create such a thing, so... If …

Member Avatar
Member Avatar
+0 forum 2

Hello there! I've got the following assignment: Write a method in Java called FirstDNAMatch(shortDNA, longDNA) that receives 2 strings with the letters that have to do with the four main nucleobases found in the nucleic acids DNA (A for Adenosine, G for Guanine, C for Cytosine and T for Thymine). The method must return the index of the first spot where the first DNA chain can connect to the second or -1 if there is no spot for the 2 chains to match. A matches with T (and other way round) and C matches with G (and other way round). …

Member Avatar
Member Avatar
+0 forum 9

Sorry if I sounds mad...I have a some knowledge in c++ programing language. But I have been wondering if I can learn assembly language so that I can play with my pc as I like by programing it, creating DOS like programs and so on...but in my research I came to know assembly language differs from system to system . If it is so how can i learn assembly language . And plz tell me if I am on the right path in programing . Plz help

Member Avatar
Member Avatar
+0 forum 6

This program is for a car rental agency. Your program will have to compute the total cost of a rental. This agency has two types of cars, and the rates per day are as follows: All cars come with a basic insurance that covers damage to third Driver above 25 years of age Driver 25 years old or younger. Compact car $60 $80 Mid-size car $75 $100 Table 4: Price list for problem A.3 parties. Comprehensive insurance cover costs $30 for compact cars and $40 for mid-size cars.

Member Avatar
Member Avatar
+0 forum 6

I'd like to know main differences between C and C++,because they look similar.

Member Avatar
Member Avatar
+0 forum 6

Please help to create a driver file of the given code becoz i dont know what should i do to create a driver file. import javax.swing.*; class Product{ private String PId; private String PName; private String PPrice; private String Pcategory; private String PQuantity; private String PDescription; public Product(){ PId=null; PName=null; PPrice=null; Pcategory=null; PQuantity=null; PDescription=null; } public Product(String i, String n, String p, String c, String q, String d){ PId=i; EmpName=n; PPrice=p; PCategory=c; PQuantity=q; PDescription=d; } public Product (Product Products){ PId=Products.PId; PName=Products.PpName; PPrice=Products.PPrice; PQuantity=Products.PQuantity; PDescription=Products.PDescription; } public String getPId(){ return PId; } public void setPId(String _PId){ this.PId=_PId; } public void setPName(String …

Member Avatar
+0 forum 0

I'm taking a database class, to be more specific MySQL. I want to know if I will use this if I enter the programing field as a C#, C++, or Java programmer. If so what will I need to know

Member Avatar
Member Avatar
+0 forum 3

Hi DW We want to run an experiment in our lab on ATM, we just want to keep it simple and easy, So far I've just created the two forms and since I've discorvered that most of the ATM's are running a Windows OS which I saw it in one garage so I just decided to start this experiment to see if it is really posible to run a Windows Application form project on an ATM but the problem with the ATM is It screen they use a special small screen to secure and they also use the special keyboard …

Member Avatar
Member Avatar
+0 forum 2

hi!guys i am very glade to told you that you guys must learn java programing language because i think aproximate one billion devices are running java...so first of all i recommeded you that you guys get the "The complete Java reference book 2"it is the best book for you guys believe me and if you guys take some interest in java you have a greate future .. thanks you guys ask me questions or whatever i help you thanks..............

Member Avatar
Member Avatar
-3 forum 7

any one help me???????????????????????????????? how to convert text file to kml file using java???

Member Avatar
Member Avatar
+0 forum 1

Roots of quadratic equcation #include<iostream.h> #include<conio.h> #include<math.h> void main() { float a,b,c,disc,root1,root2; cout<<"enter a"<<endl; cin>>a; cout<<"enter b"<<endl; cin>>b; cout<<"enter c"<<endl; cin>>c; disc=(b*b)-(4*a*c); root1=(-b+sqrt(disc))/(2*a); root2=(-b-sqrt(disc))/(2*a); cout<<"root1"<<root1<<endl; cout<<"root2"<<root2<<endl; getch(); } any question or assignment ask to me!guys

Member Avatar
Member Avatar
+0 forum 8

Hi I am new to programing and I want to learn some basic tings. I also want to learn to create basic games. Could anyone reccomend a good book or websiteto get me started? Thanks, Robbie

Member Avatar
Member Avatar
+1 forum 2

am frederick sekyi and am new to this website.can any of you help me with computer programing?

Member Avatar
Member Avatar
+0 forum 2

i have to create a calculator (i'm a 12 year old) for the science fair. on textwrangler when i try to compile it :Expected end of line, etc. but found identifier. here is my code: import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class JavaCalculator extends JFrame { private JButton jbtNum1; private JButton jbtNum2; private JButton jbtNum3; private JButton jbtNum4; private JButton jbtNum5; private JButton jbtNum6; private JButton jbtNum7; private JButton jbtNum8; private JButton jbtNum9; private JButton jbtNum0; private JButton jbtEqual; private JButton jbtAdd; private JButton jbtSubtract; private JButton jbtMultiply; private JButton jbtDivide; private JButton jbtSolve; private JButton jbtClear; …

Member Avatar
Member Avatar
+0 forum 2

I want to buy a graphic card for my pc but I dont know what model is adapt with my system. please guide me

Member Avatar
Member Avatar
+0 forum 3

A company transmits data over the telephone, but it's concerned that its phones could be tapped. All its data is transmitted as four-digit integers. The company has asked you to write an application that encrypts its data so that it may be transferred more securely. Encryption is the process of transforming data for security reasons. Your application should read digits entered by the user and encrypt the information. Assume that the user inputs a single digit in each textbox. Use the following technique to encrypt the number: A) Replace each digit by (the sum of that digit and 7) Mod …

Member Avatar
+0 forum 0

I need my overall data to all be output as double, but my counter is an int, and i imagine you cant use a double as a counter, so when it goes to compute my data, theres a mismatch between my counter and the rest . i need a way of converting my data to double for out put. Here's my code....i have a test also, all it does is call the main method. public class Salary { public void calcSalary() { int wages[]={50000,40000,30000,20000,10000,60000,35000,46000,23000,19000}; final int TOTAL_LENGTH=10; //declare constant int total[]=new int[TOTAL_LENGTH]; int bonus; int counter; System.out.printf("\n%s\t%11s\n\n","REP","SALARY"); for (counter=0; counter …

Member Avatar
Member Avatar
+0 forum 3

Hi i have the following code. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim con As New OleDbConnection Dim da As New OleDbDataAdapter Dim ds As New DataSet Dim dsnewrow As DataRow Dim cb As New OleDbCommandBuilder(da) Dim a As String con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\DB.mdb;Jet OLEDB:Database Password=123" con.Open() a = "select * from Login" da = New OleDbDataAdapter(a, con) da.Fill(ds, "Login1") dsnewrow = ds.Tables("Login1").NewRow() ds.Tables("Login1").Rows.Add(dsnewrow) dsnewrow.Item("Lid") = "test" dsnewrow.Item("Name") = Uname2.Text.ToString() dsnewrow.Item("Lps") = psw1.Text.ToString() dsnewrow.Item("Acces1") = Acs.Text.ToString() dsnewrow.Item("Date1") = DTp1.Value.ToString() [COLOR="Red"]da.Update(ds, "Login1")[/COLOR] Uname2.Text = "" psw1.Text = "" Acs.Text = "" DTp1.Value = Today() con.Close() …

Member Avatar
Member Avatar
+0 forum 4

How would you write this program in Python IDLE? Write a program with a function that accepts a string as an argument and returns (some type of return value) a copy of the string with the first character of each sentence capitalized. For instance, if the argument is "hello. my name is Joe. what is your name?" the function should return a string "Hello. My name is Joe. What is your name?" The program should let the user enter a string and then pass it to the function. The modified string should be displayed. I need help writing this program! …

Member Avatar
Member Avatar
+0 forum 3

Hello All, I'm working on my first Python plot in my programming class this week. My assignment is to write a program to plot data contained in a csv format. Here is the data: "Bowl number", "Date", "Bowl location", "Winner", "Number wings eaten" "I", "1/29/1993", "Wyndham Franklin Plaza Hotel", "Carmen ’The Beast From the East’ Cordero", 100 "II","1/28/1994", "The Main Event", "Kevin ’Heavy Keavy’ O"Donnell", 127 "III", "1/27/1995", "Club Egypt", "Kevin ’Heavy Keavy’ O"Donnell""", 133 "IV","1/26/1996","Electric Factory","Glen ’Fluffmaster’ Garrison", 155 "V", "1/24/1997", "Electric Factory", "Eric ’Gentleman E’ Behl", 120 "VI","1/23/1998","Spectrum","Mark ’Big Rig’ Vogeding", 164 "VII", "1/29/1999", "Spectrum", "Bill ’El Wingador’ …

Member Avatar
+0 forum 0

Well when I run my program the bar at the top says C:\programing\C++\Test\Test.exe (<<just an example) How do I change this? And how do I make the console window look more XPish (I heard it was called luna). Answer the title one first please. I wnt this too be all from a Console app no WinPrograming.

Member Avatar
Member Avatar
+0 forum 8

Ok, I have chosen my exact path in life and need to learn this: How would I program for Linux? I have only minute ammouts of windows programing so start from absalute basics (like after cout and cin and main() stuff, start at oh something like LinMain or whatever linux uses. I know I said I dont like linux but that is because I cant get it to work (wont post details) So anyone? Also if Linux wasn't programed in c or c++ or d, tell me so I can find the languige, also I consider windows programing and c++ …

Member Avatar
Member Avatar
+0 forum 3

with this codes i created rectangle image with a line inside that has to mimic a single clock. Dim MyGraphics As graphics=e.graphics my graphics.Draw Rectangle(pens.colour,x1,X2,y1,Y2):whereby x1=60,x2=70,y1=80,y2=90,and choosen colour my graphics.Draw line(pens.colour,x1,x2,y1,y2):whereby x1=60,x2=70,y1=100,y2=120,and also choosen colour. Now help me with ideas and solution here.the hand or line within the square has to rotate continually.now as a clue,as our lecture prescribed,under line,one group of X and Y axis has to remain constant or steady,while other y and x axis has to change now instead of using numbers we have to use variables eg lets say x1 which is 60 and y1 which …

Member Avatar
Member Avatar
+0 forum 1

The End.