Question
Write a program to input a number and check whether it is a prime or not.

Answer

Get the step-by-step solution for this question inside the Vidyadip app.

Get the answer in the app

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free

Similar questions

How will you add a column to a pandas DataFrame?
Write function insert() to insert the new row in table emp. The function will take the values as parameter.
Write the algorithm for the bubble sort.
Define DataFrame in Pandas?
What are the positive effects of technology?
Write SQL queries for (a) to (d) and find outputs for SQL queries (e) to (i), which are based on the tables.

TABLE: WATCHES

Watchid Watch_name Price Type Qty_store
W001 High time 10000 Unisex 100
W002 Life time 15000 Ladies 150
W003 Wave 20000 Gents 200
W004 High fashion 7000 Unisex 250
W005 Golden time 25000 Gents 100

TABLE: SALE

Watchid Qty_Sold Quarter
W001 10 1
W003 5 1
W002 20 2
W003 10 2
W001 15 3
W002 20 3
W005 10 3
W003 15 4

(a) To display all the details of those watches whose name ends with ‘time’

(b) To display watch’s name andprice of those watches which have price range between 5000-15000

(c) To display total quantity in store of unisex type watches

(d) To display watch name and their quantity sold in first quarter

(e) Select max(price),min(qty_store) from watches;

(f) Select quarter, sum(qty_sold) from sale group by quarter;

(g) Select watch_name,price,type from watches w, sale s where w.watchid=s.watchid;

(h) Select watch_name, qty_store, sum(qty_sold),qty_store

(i) W.watch=s.watchid group by s.watchid;

Based on the following python code, find out the expected correct output(s) from the options (i) to (iv)
import random
lst=["Red","Blue","Green","Yellow"]
for i in range(5,2,-1):
print(lst[random.randint(1,2)],end="%")
(i) Blue%Green%Green%
(ii) Blue%Red%Green%
(iii) Blue%Green%Yellow%
(iv) Blue%Blue%Red%
Name the few tools & resources for students with disabilities which can help student to learn the things easily.
What is the difference between Circuit Switching and Packet Switching Technique?
Categorise the following under Client Side and Server Side script category:

(i) VB Script

(ii) ASP

(iii) JSP

(iv) JavaScript