Tuesday, September 10, 2019

prime number using python

# Python program to check if the input number is prime or not

num = 407

# take input from the user
# num = int(input("Enter a number: "))

# prime numbers are greater than 1
if num > 1:
   # check for factors
   for i in range(2,num):
       if (num % i) == 0:
           print(num,"is not a prime number")
           print(i,"times",num//i,"is",num)
           break
   else:
       print(num,"is a prime number")
     
# if input number is less than
# or equal to 1, it is not prime
else:
   print(num,"is not a prime number")

Arduino Default Fuse bits

Arduino Default Fuse Settings

Here are the default fuse settings for each Arduino from the boards.txt included with the Arduino development software.
To understand more about the fuse settings for your microcontroller, visit Engbedded’s AVR Fuse Calculator.
To write fuse settings, you will need a programmer with this capability. I use Mighty Ohm’s high-voltage rescue shield available here.

Arduino Uno

Low Fuse0xFF
High Fuse0xDE
Extended Fuse0x05

Arduino Duemilanove or Nano w/ ATmega328

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0x05

Arduino Diecimila, Duemilanove, or Nano w/ ATmega168

Low Fuse0xFF
High Fuse0xDD
Extended Fuse0x00

Arduino Mega 2560

Low Fuse0xFF
High Fuse0xD8
Extended Fuse0xFD

Arduino Mega (ATmega1280)

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0xF5

Arduino Mini

Low Fuse0xFF
High Fuse0xDD
Extended Fuse0x00

Arduino Fio

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0x05

Arduino BT w/ ATmega328

Low Fuse0xFF
High Fuse0xD8
Extended Fuse0x05

Arduino BT w/ ATmega168

Low Fuse0xFF
High Fuse0xDD
Extended Fuse0x00

LilyPad Arduino w/ ATmega328

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0x05

LilyPad Arduino w/ ATmega168

Low Fuse0xE2
High Fuse0xDD
Extended Fuse0x00

Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega328

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0x05

Arduino Pro or Pro Mini (5V, 16 MHz) w/ ATmega168

Low Fuse0xFF
High Fuse0xDD
Extended Fuse0x00

Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega328

Low Fuse0xFF
High Fuse0xDA
Extended Fuse0x05

Arduino Pro or Pro Mini (3.3V, 8 MHz) w/ ATmega168

Low Fuse0xC6
High Fuse0xDD
Extended Fuse0x00

Arduino NG or older w/ ATmega168

Low Fuse0xFF
High Fuse0xDD
Extended Fuse0x00

Arduino NG or older w/ ATmega8

Low Fuse0xDF
High Fuse0xCA

python class topic video