New Ideas YT
7.84K subscribers
428 photos
4 videos
79 files
1.62K links
This channel provides O level and CCC study material (pdf). Also visit our Website www.examjila.com | www.primegyan.com Youtube channel :- www.youtube.com/Newideasyt
Download Telegram
Q. Python Program to Display Calendar
import calendar
yr=2024
mnth=7
print(calendar.month(yr,mnth))

Q. Python Program to Generate a Random Number
import random
print(random.randint(1,100))

Q. Python Program to Find ASCII Value of Character
char=input("Enter any character")
print(ord(char))

Q.Python Program to Find the Sum of Natural Numbers
num=int(input("Enter Last Value"))
if num<0:
print("Enter postive number")
else:
sum=0
while num>0:
sum=sum+num
num=num-1
print("the sum is =",su
void setup()
{
Serial.begin(9600);
}
void loop()
{
Serial.print(”Hello World");
delay(1000);
}
void setup()
{
pinMode(11, OUTPUT); //Set the Pin as an Output
}
void loop()
{
digitalWrite(11, HIGH); // Turn on the LED
delay(1000); // Wait for one second
digitalWrite(11, LOW); // Turn off the LED
delay(1000); // Wait for one second
}
const int buttonPin = 7;
const int ledPin = 8;
int buttonState = 0;
void setup()
{
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == HIGH)
{
digitalWrite(ledPin, HIGH);
}
else
{
digitalWrite(ledPin, LOW);
}
}