Recent content by mr.me
-
M
Comp Sci Next Perfect Squares for a Given Number
As an aside, i.e. not homework, what if I wanted to write a square root function, that we allow you to set the given decimal points for stuff like the square of 7 or the square of 10.? I know C++ already has a sqrt function but could I use my code, clumsy though it may be or would I have to...- mr.me
- Post #7
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci Next Perfect Squares for a Given Number
Thank-you, I see what I was doing wrong. We are required to use each std:: for our work, instead of loading the whole namespace. Thanks again :smile:- mr.me
- Post #6
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci Next Perfect Squares for a Given Number
I guess that was an obvious mistake :-p Still I am not sure how to construct my loop for the problem in question With the second loop I wanted to check each iteration until a got a value less-than the user entered value... So if I entered 6 I wanted it to return a 4 because that is the...- mr.me
- Post #3
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci Next Perfect Squares for a Given Number
Heres my problem, step one I've solved. Step two only ever returns the original newRoot*newRoo and I don't understand how to correct itTo demonstrate event controlled loops use arithmetic to create: 1.Create a sequence to determine the next largest perfect square 2.Create another sequence to...- mr.me
- Thread
- C++ Loops Square
- Replies: 6
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci C++ identifying a palindrome (output error)
Thanks I never got an error message and couldn't get it to run proper so it tried using a different compiler and fixed the error .- mr.me
- Post #5
- Forum: Engineering and Comp Sci Homework Help
-
M
Comp Sci C++ identifying a palindrome (output error)
I had a homework assignment that wanted me to write a function that would determine whether a five digit integer was a palindrome or not When I run the program I enter the palindrome there is no output for my if/else statement. What did I do wrong? Code Below #include <iostream> using...- mr.me
- Thread
- C++ Error
- Replies: 4
- Forum: Engineering and Comp Sci Homework Help
-
M
Python Save Output of Python Program to TXT File: Tips & Tricks
This isn't exactly part of my homework but I wanted to know how I could save the output of this program to txt file? The program was my homework and it was to allow the user to enter the starting values for a multiplication tables columns and rows and print a 10x10table I did it like so...- mr.me
- Thread
- File Output Python
- Replies: 3
- Forum: Programming and Computer Science
-
M
Humanities: What are the more important things to know?
You seem to say that your problem is that your completely unfamiliar with subjects in a formal way. I would suggest starting with something slightly less contemporary then you find at the bookstore. Will Durant wrote extensively and in a large scope on the Humanities, though I disagree with...- mr.me
- Post #2
- Forum: Art, Music, History, and Linguistics
-
M
Printing a multipication table from user input
My assignment was to "create a Python script that will allow the user to input the starting value for the row and column of a multiplication table and then print to screen the table containing ten columns and ten rows. Include a header for each row and column" I was able to produce the...- mr.me
- Thread
- Input Printing Table
- Replies: 1
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
It does seem to work on several tests, however I changed it and noticed no difference- mr.me
- Post #23
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
It sorted several lists of many elements, correctly def bubbleSort (theList): size = len(theList) - 1 while (0<size): #Corrected the condition for the first while #it is now set to perform from a range of 0...- mr.me
- Post #21
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
I think I got it, half the time the problem I was having was that in my text editor my print statement was set outside the function and always displayed unsorted, I don't know why it copied correctly here, so even when I made (several tries) the first loop while(0<size) it wasn't working...- mr.me
- Post #19
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
I tried it on a longer list, and it's obviously I don't understand what I'm doing, can you show me a correct way to do it, I don't mean to just ask for the answer but I don't understand what the problem is anymore and now I'm more confused- mr.me
- Post #17
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
Yes, it works and exists. I fixed an indent on the post that might have made it look wrong I guess what I was asking is in languages where it is necessary to write a sort like this, is the code stylistically correct. Again, thanks for all the help.- mr.me
- Post #15
- Forum: Engineering and Comp Sci Homework Help
-
M
Bubble sort doesn't stop as expected
Is this correct ? def bubbleSort (theList): size = len(theList) - 1 while (size > 0): index = 0 while ( index>size ): if (theList[index] > theList[index+1]): temp = theList[index] theList[index] = theList[index+1]...- mr.me
- Post #13
- Forum: Engineering and Comp Sci Homework Help