0% found this document useful (0 votes)
7 views3 pages

AI Practical Questions

The document lists various programming tasks including swapping variables, converting temperatures, checking even or odd numbers, creating a simple calculator, printing multiplication tables, checking for prime numbers, calculating averages, summing numbers, sorting a list, and printing squares of numbers. Additionally, it includes two code output questions related to string slicing and list manipulation. Each task is designed to enhance programming skills and understanding of basic concepts.

Uploaded by

TechConnector
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views3 pages

AI Practical Questions

The document lists various programming tasks including swapping variables, converting temperatures, checking even or odd numbers, creating a simple calculator, printing multiplication tables, checking for prime numbers, calculating averages, summing numbers, sorting a list, and printing squares of numbers. Additionally, it includes two code output questions related to string slicing and list manipulation. Each task is designed to enhance programming skills and understanding of basic concepts.

Uploaded by

TechConnector
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1) WAP to swap two variables.

2) WAP to convert temperature in Celsius to Fahrenheit.

3) WAP to check whether a number is even or odd.

4) WAP to create a simple calculator which performs four basic operations: addition,
multiplication, subtraction, and division.

5) WAP to print table of a number accepted by the user using for loop.

6) WAP to check whether a number is prime or not using for loop.


7) WAP to accept 10 numbers from the user using while loop and print there average.

8) WAP to print the sum of user entered 10 numbers using while loop.

9) WAP to accept a list of 10 numbers from user and sort it in ascending order.

X10) WAP to accept a list of 10 numbers from the user and print a list of squares of each
item.
11) What will be the output of the below code:
A=”holiday”
print(A[2:-2])

12) What will be the output of below code:


A=list(range(10))
print(A[::-1])

You might also like