Questions tagged [definition]

A generic tag for topics providing definitions.

A generic tag for topics providing definitions.

1574 questions
-1
votes
6 answers

Why specify a method twice - Java

I am a python coder but recently started a forey into Java. I am trying to understand a specific piece of code but am running into difficulties which I believe are associated with not knowing Java too well, yet. Something that stood out to me is…
Mike Nedelko
  • 709
  • 1
  • 8
  • 28
-1
votes
1 answer

Variable is not defined in the function

import random def game(n): while counter < n: n1 = random.randrange(1,10) n2 = random.randrange(1,10) counter = 0 print (str(n1) + " + " + str(n1)) answer = input("Enter answer: ") if answer…
-1
votes
2 answers

C++ Multiple Definition [Error]

Error: multiple definition of `GameKey::getGameKeywords()' GameKey.cpp and .h cause error, while ExitKey.cpp and .h are essentially the exact same class and header but do not produce an error. (I know the whole thing about using namespace…
Sean
  • 1
  • 2
-1
votes
1 answer

What are other ways to define Normalized Data?

I know Normalization means reducing redundancy in data sets but what is the definition of normalized data? Can I describe it as the "simplest form" of a data set?
Rogue
  • 1
  • 1
-1
votes
1 answer

Python: CARD GAME BOT - Remastering (How do you make a line continue regardless of where it is?)

I'm remastering the bot by my self and I'm stuck! This is a code which prompts the user to select how many cards they get from the options of 7, 9, 11, and 15 def Cards(): print("Card Amounts") print("\nChoices") print(7) …
-1
votes
1 answer

R calculate percentile using Stata definition

I did two different analyses. One with R and another with Stata, based on percentile calculation. However I have a mismatch between the two results due to a different percentile method calculation between R and Stata. Do you know if I can use the…
user3355655
  • 463
  • 3
  • 15
-1
votes
1 answer

(C++) Why is it that defining a constructor causes my program to not compile?

I'm (somewhat) new to C++ and I've been trying to get a program to work. It all compiles fine until I start to define a class constructor within the source file, even though I have declared it in the header file. I'm not sure if it's because I…
-1
votes
2 answers

Python- Module not having defined attribute

The new code is -- game.py from globalized import * """need to fix events file""" game = True while game is True: print(location[1]) events1() for (i, t) in enumerate(transitions[location]): print(i + 1, t[0]) …
-1
votes
4 answers

Function: Returning a string of nonvowels

So assuming I've already defined a function called vowel_call that draws out only the vowels from a string, how do I integrate this function into another function called nonvowels to return a string of only nonvowels from a general string? def…
Deer530
  • 73
  • 1
  • 1
  • 10
-1
votes
2 answers

Function Definition: Matching two input lists

def match_numbers (nlist, nlist1): '''Returns the integer string whose first three numbers are on the first list''' for x in nlist: for x in nlist1: print(x) So suppose the first list was ['543', '432'] and the second list had…
Deer530
  • 73
  • 1
  • 1
  • 10
-1
votes
1 answer

Function Definition: Calling create_rectangle to create square

Implement a function called create_square that takes three arguments—the x-coordinate and the y-coordinate of the upper-left corner and the length of a side. calling the predefined tkinter function create_rectangle. import tkinter def create_square…
Deer530
  • 73
  • 1
  • 1
  • 10
-1
votes
1 answer

How to define member function in separate source file?

Consider following two programs. p1.cpp #include struct test { void fun(); }; int main() { test t; t.fun(); } p2.cpp #include void test::fun() { std::cout<<"fun() is called\n"; } I am compiling like…
Destructor
  • 14,123
  • 11
  • 61
  • 126
-1
votes
2 answers

False is not true error?

I'm trying to set global definitions to True, but I'm always getting an error saying "AssertionError: False is not True" From instructions: 'Only things that are expected to be constant should be defined as globals. That is true for all of these.' …
Vincent Luc
  • 79
  • 1
  • 1
  • 5
-1
votes
2 answers

Are the constructors defined and initialized correctly in C++ code?

I saw this code on the Internet and I didn't understand it. Could anyone help me to translate it? Are the constructors defined and initialized correctly? struct account { string login; string surname; string name; string passwd; bool connecte; /**…
-1
votes
1 answer

Python Functions AFTER code

Is there a way (without putting the function in a separate file) to define the content of a function after the bulk of my code? Sort of like C where you define prototypes and put the body later on in the file. Ex; blah blah…
cclloyd
  • 8,171
  • 16
  • 57
  • 104
1 2 3
99
100