I'm trying to get data from my temperature and humidity sensor and write the data to a JSON file every minute. I started learning Python two days ago, so I have no idea why these errors occur (the output is in the attachment):
The Code:
import time
import board
import adafruit_dht
import...
Hi, I'm working on a small game where the computer generates a number, and you have to input (like guess) a random number. Then, the computer will tell you whether the guessed number is too big or too small, or if you guessed it right.
I might not have imported the random number correctly, but...
Hello, I wanted to ask for a shortcut to mark multiple lines and put them as comment, I don't mind if each line has # at the beginning
for example:
The code is:
1. print("hello world")
2. print("hello world")
3. print("hello world")
I want to make it:
1. # print("hello world")
2. # print("hello...
More info is on the bottom, im trying to merge 2 f2u templates together, specifically a snippet of one html onto another. And i am struggling tremendously, im sorry i have to put so many links, i really just cant share it all here :-: ive been looking for help and trying to fix it mysefl fir...
Hello, I'm fairly new, and I was wondering, why does
!(printf("Hello world"));
still print "Hello world? Even though it's using the logical NOT operator...
As well as if it was used as a condition in a while() loop...
while(!(printf("Hello world"))) {}
Why does it print only once? I thought...
I believe that in order for you to learn something effectively, you have to make a plan. Many people are confused about where to start in order to become a web developer. Therefore, I decided to share with you some of the videos that guided me and helped me to learn html and css.
First video...
Hello. New to code forum here. I am getting into coding, but I am kind of confused about the learning path of software engineering and mobile development. I would like to develop computer and mobile apps, but I would also like to learn web development and other skills that would allow me to have...
Here's the code for the encryption. First every second letter is set and then every other letter(input: abcdefgh; output: acegdfh). I can't figure out the decryption. I figured, seperating the encrypted text in two and alternately taking a letter from each would work. Any ideas for the code...
i know this makes no sense but while messing around i ended up accidentally typing that in and thats the exact distance i needed. but if i delete it and try putting 230px or 30 px its not the same at all.
what is this?? is it functional? what does it stand for?
.display-grid{
display...
i know this makes no sense but while messing around i ended up accidentally typing that in and thats the distance i need perfectly. but if i delete it and try putting 230px or 30 px its not the same at all.
what is this?? can i use it elsewhere?
ive been following a tutorial to make a discord bot for a small server with my friends and am currently struggling to understand why this piece of code is not working.
The aim for this part was to get the bot to say hello when i type hello into the server. The prefix is supposed to be used to...
Hi, I just began python and made a dice simulator. I am having the following issues: 1)the random integer is always the same (it is a value from 1 to 6, but within the loop it is always the same). Can I fix this or perhaps this is because I'm using an online interpreter?2) After the loop goes...
I am a complete novice when it comes to front-end developing. I am knowledgeable in HTML, CSS. And have recently started JavaScript (Taking courses on Udemy, CodeAcademy, Fullstack).
I have been looking into coding boot camps, original plan was Fullstack, but have changed to TechElevator...
Hello, I'm currently learning C# by reading 'Introduction to CSharp by Rob Miles. I'm still really new at it but I have come across a part where I don't really understand the concept.
I don't really understand how ("2.0"+3.0); turns into 2.03, I understand that it takes "2.0' literally...
Hello Coders!
I'm looking for help swapping variables with C++, I know that you can use a temporary variable but you can also do it without it. Can someone show me both ways?
int a = 5;
int b = 10;
//I want A to 10 and B to be 5.
// I think I have an idea, is this correct?
a=a+b;
b=b-a
Hi guys,
I'm currently learning C++ and I'm kinda wondering what I should build to practice my C++. I know it shouldn't be too complex or I'll never finish it but I'm not sure what to build, I was thinking of a calculator or even a notepad but would that be too much? Any ideas?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.