IoT (KME-553)-Ex-3
IoT (KME-553)-Ex-3
OBJECTIVE
SOFTWARE/COMPONENTS USED
1. PC with Arduino Thonny software
2. Raspberry Pi Pico (RP2040) board
3. Micro USB cable
a) Print a name 'n' times, where name and n are read from standard input, using for and while
loops.
CODE
# using for and for loops a = input("Enter your name: ") n =
int(input("Enter the number you want to print that times: ")) for
i in range(n): print(a) #print(i)
RESULT
RESULT
CODE
import time for i
in range(10):
localtime = time.asctime( time.localtime(time.time()) ) # DAY, DATE & TIME print
("Local current time :", localtime)
time.sleep(10)
RESULT
PROCEDURE
Click the run button and save it on the Raspberry Pi Pico board. Save the file as main.py.
RESULT
We have successfully run python programs on Raspberry Pi.