Categories
Mastering Development

Putting a “in list” into an if statement

I am currently in the process of creating a hangman game. My problem is in the 2nd for loop, for x in wordlist. This for loop is supposed go through the wordlist (in this example [‘H’, ‘E’, ‘L’, ‘L’, ‘O’]) and: if x in newwordlist or x==guessedletter, then x is printed onto the new list […]

Categories
Mastering Development

Second value of scanf not getting changed

When the & is added to y, y never changes, however if I remove the & y changes but the program ends right after the scanf double scan_data(char* a, double* b){ char x; double y; int result; printf("input en operator og hvis relevant, operand: "); scanf("%c, %lf", &x, &y); /*Hvis unær output=0,0.*/ printf("scan y step […]

Categories
Mastering Development

TypeError: missing 1 required positional argument: ‘self’ vs as alias during import

I am new to defining self and calling functions in another python file. I am using python 3.7. Suppose I have two python file, one with the class (name.py) and another calling this class function in another file (test.py). I am trying to understand why python shows error in Try#1 but not in the #2? […]

Categories
Mastering Development

Menu opens and closes right away

On my app I have the above menu that worked fine. After upgrading react and react-dom from 16.14.0 to 17.0.0 when clicking on the menu icon, the menu flashes-it opens and closes right away. It looks like, for some reason the ClickAwayListener is being fired, any idea what can be causing that? import ClickAwayListener from […]

Categories
Ask Biology

Are the vaccines good enough? [closed]

So with an antivirus at hand, say the viruses attacks on 5 different levels: IE: v,w,x,y,z where only x,y,z is an attack dangerous to humans. If the vaccine has immune cells for the three phenotypes with attacks dangerous to humans, the virus will be "domesticated" to strengthen the pool with the v and w attack […]

Categories
Ask Electrical Engineering Engineering

How do I write the top module for this Verilog code

I am writing Verilog code for A 4-bit BCD adder. I am having trouble wringting the top module and understanding how to call the other modules into the top module. Here are my codes. module topmodule(x, y, cin, cout, hex0, hex1, hex2, hex3, hex4, hex5, L5, fulladder, ssdxconverter, ssdyconverter, sumconverter); input [3:0] x; input [3:0] […]

Categories
Mastering Development

solve_bvp not giving the correct solution

I am trying to solve a boundary value problem that I know will have a Bessel-like shape. My conditions are u[0]=1,u[40]=v[0]=v[40]=0. However, for U, it is giving me a flat line with x=1. Can anyone tell me what I have done wrong? Thanks in advance. Here is my code: #Parameters mu=0 eta = 1 #0.3 […]

Categories
Mastering Development

I’m trying to make a square character sprite in pygame. Can you please look at my code and tell me what I did wrong? Link to video about it

a youtube video told me to put what I’ve already put. https://www.youtube.com/watch?v=bVx2nhB0t1o&feature=youtu.be My window opens, but just stays at a black screen. When I close the window, then I get the error message: Traceback (most recent call last): File "./invaders.py", line 23, in <module> keys = pygame.key.get_pressed() pygame.error: video system not initialized I don’t really […]

Categories
User Help

2 out of 4 CPU cores are running 10C hotter under full load

My laptop is an Acer Helios 300 with i5-8300h, GTX 1060, and 16GB RAM. I have noticed that core 1 and core 3 run 10-15C hotter under multi CPU load. Throttlestop benchmark temps I have repasted the heatsink with arctic silver 5 multiple times by trying different methods like the dot, X, and spreading it […]

Categories
Mastering Development

family tree in SWI PROLOG

there is some error with the grandma , cousin, brother, uncle rules i tried so many rules but still could not find the correct one it returns false , please helpppppppppp /*rules*/ male(james). male(charles). male(william). female(megan). male(george). female(catherine). female(diana). female(elizabith). parent(james, charles). parent(james, elizabeth). parent(charles, catherine). parent(charles, william). parent(charles, megan). parent(elizabeth, diana). parent(diana, george). /*rules*/ […]