0% found this document useful (0 votes)
3 views

Python

The document outlines examination details for Python Programming at Gujarat Technological University, including instructions, question formats, and marks distribution for multiple semesters. It covers various topics such as data types, control structures, functions, file handling, and MicroPython. Each question section requires students to demonstrate their understanding through programming tasks and theoretical explanations.

Uploaded by

izhanmansuri19
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)
3 views

Python

The document outlines examination details for Python Programming at Gujarat Technological University, including instructions, question formats, and marks distribution for multiple semesters. It covers various topics such as data types, control structures, functions, file handling, and MicroPython. Each question section requires students to demonstrate their understanding through programming tasks and theoretical explanations.

Uploaded by

izhanmansuri19
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/ 16

Enrolment No.

/Seat No_______________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–V (NEW) EXAMINATION – WINTER 2024
Subject Code:3151108 Date:25-11-2024
Subject Name: Python Programming
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Marks
Q.1 (a) List the advantage and disadvantage of python. 03
(b) Differentiate between List and Tuple. 04
(c) Demonstrate Membership operators and identity operators with suitable 07
examples.

Q.2 (a) What are negative indexes and why are they used? 03
(b) Write a python program to check if a string is palindrome or not. 04
(c) Write a Python program to generate pyramid pattern as given below. 07
*
**
***
****
OR
(c) Explain while loop in python. How to create infinite while loop? How to 07
break infinite while loop in certain condition? Explain with example.

Q.3 (a) Write a Python function to sum all the numbers in a list. 03
(b) Discuss global, local and nonlocal variable in detail. 04
(c) Develop python program to find maximum, minimum and average of 07
given numbers using user define function.
OR
Q.3 (a) What is a function? Mention the type of function and use. 03
(b) Describe with example: Module in python 04
(c) Write a python function to convert string into upper case and find length 07
of string. String will be passed to function.

Q.4 (a) Describe range function with example. 03


(b) Enlist all file processing modes supported in Python. 04
(c) What is an exception? Explain about the different types of Exceptions in 07
Python
OR
Q.4 (a) List and explain in brief different types of errors occurred in Python. 03
(b) Develop python program to create csv file that contain five entries along 04
with header (serial number, name, birth_date and city).
(c) Explain the different methods available for manipulating the CSV files in 07
python.

Q.5 (a) What is micro python? Discuss unique features of micro python. 03
(b) List different features available in Node MCU 8266 controller. 04

1
(c) Write MicroPython program to read proximity sensor connected at Pin1, 07
blink the LED if sensing is detected.
OR
Q.5 (a) Enlist various IDE available to carry out programing in MicroPython. 03
(b) Describe merits and demerits of Micropython over python. 04
(c) Develop program in Micropython to send digital data on GPIO pin of 07
Micropython supported board and blink LED connected to it.

***************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – SUMMER 2024
Subject Code: 3151108 Date:16-05-2024
Subject Name: Python Programming
Time:02:30 PM TO 05:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
MARKS
Q.1 (a) Differentiate list and tuples. 03
(b) Develop python program to print even numbers in a list. 04
(c) Explain and categorize operators in python. 07

Q.2 (a) Explain dictionary in detail. 03


(b) Develop python program to count occurrences of an 04
element in a list
(c) Explain various features of a plot in python. 07
OR
(c) Develop python program that create matrix graph of 07
following plot using subplot
1.linear plot 2.Scatter plot 3.Histogram and 4.Bar
chart

Q.3 (a) Explain for loop in detail. 03


(b) Develop python program to construct following pattern: 04
*
**
***
****
*****
****
***
**
*
(c) Make use of if, if..else, if..elif..else and , nested if. 07
OR
Q.3 (a) Explain while loop in detail. 03
(b) Develop python program to print factorial of a number.. 04
(c) Explain working of break, continue and pass statement. 07

Q.4 (a) Differentiate actual and formal arguments. 03


(b) Develop python program to display fibonacci sequence 04
using recursion method.
(c) Develop python program that convert decimal to binary, 07
decimal to octal and decimal to hexadecimal number
using user define function.

1
OR
Q.4 (a) Define SCOPE, Discuss global and local variable in 03
detail.
(b) Define Lambda function, Utilize lambda function in an 04
example.
(c) Develop python program to find maximum, minimum 07
and average of given numbers using user define function.

Q.5 (a) Define micropython, explain feature of micropython. 03


(b) Develop python program that read and print first n lines 04
from existing file also create new file that have first n
lines from the existing file.
(c) Explain Exceptional handling in detail 07
OR
Q.5 (a) Enlist mode of file in python. 03
(b) Develop program in micropython to send digital data on 04
GPIO pin of micropython supported board and blink
LED connected to it.
(c) Develop python program to create csv file that contain 07
five entries along with header (serial number, name,
birth_date and city).

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2023
Subject Code:3151108 Date:05-12-2023
Subject Name:Python Programming
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Describe membership operator and identity operator with 03
example.
(b) Write Python program to find sum of first N numbers using while 04
loop. (Take N as user input)
(c) Differentiate List, Tuple, Set and Dictionary. 07

Q.2 (a) Describe following list methods with example. 03


(1) append( ) (2) insert( ) (3) discard( )
(b) Describe for loop with example. 04
(c) Write Python code to print following pattern using nested loop. 07
1
01
101
0101
10101
Take Number of row as user input.
OR
(c) Write Python code to find determinant of 3x3 Matrix. Enter 9 data 07
run time.

Q.3 (a) Describe python tuple with example. Describe any two built-in 03
tuple methods
(b) Describe filter method/function available in python with example. 04
(c) Write a python program to read marks of students from 07
“student_marks.csv”. Find average, maximum, and minimum
marks from data. (File contains 100 records)
OR
Q.3 (a) Describe different methods to make dictionary variable. 03
(b) Enlist different modes of opening file. Describe any three method 04
with example
(c) Write a program to print 100 fibonacci numbers in file 07
“Myfibonnaci.csv”

Q.4 (a) Enlist types of plot available in python matplotlib module. 03


(b) Describe python function with keyworded variable length 04
argument with example.

1
(c) Write following python functions: 07
Function-1: Returns reverse string word wise.
Function-2: Count occurrence of vowels from input string.
Design Main python code where above functions are called.
OR
Q.4 (a) Enlist python operators which results in Boolean output. Explain 03
with example.
(b) Enlist python errors. Describe try-except block with example. 04
(c) Write a python program to find roots of following quadratic 07
equation and plot it.
y = 3x2 -5x - 4
in the range of -5 to 5 on plot. Put axes label and plot title.

Q.5 (a) Enlist various tools available to program MicroPython. 03


(b) Describe lambda function with two examples. 04
(c) Sketch circuit diagram to interface 8-LEDs with GPIO of CPU* 07
Write MicroPython program to blink LEDs in ring counter pattern.

CPU* : Microcontroller board which supports Micropython


Programming.
OR
Q.5 (a) Describe merits and demerits of Micropython over python. 03
(b) Describe Modules in python. 04
(c) Sketch circuit diagram to interface 16x2 LCD with CPU* 07
Write MicroPython program to display “Python Programming” on
first line of LCD.

CPU* : Microcontroller board which supports Micropython


Programming.

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE – SEMESTER- V EXAMINATION-SUMMER 2023
Subject Code: 3151108 Date: 23/06/2023
Subject Name: Python Programming
Time: 02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) What are key features of python? 03
(b) Differentiate between compiler and interpreter. How is the 04
python an interpreted language?
(c) What is the difference between list and tuple in python? 07
Explain with suitable example.

Q.2 (a) What are local variable and global variable in python? 03
(b) Explain dictionary in python with the help of example. 04
(c) What are common built-in data types in python? 07
OR
(c) What is type conversion in python? Explain with the help 07
of suitable example.
Q.3 (a) Discuss the following function of List in python. 03
a) append( )
b) count( )
c) reverse( )
(b) Explain the use of break, continue and pass statement in 04
python.
(c) Explain Logical Operator and bitwise operator in python. 07
OR
Q.3 (a) Write the output of the following code. 03
txt = "Python Programming"
x = txt.casefold()
print(x)
y = txt.count("P")
print(y)
x = txt.split()
print(x)
(b) Write a python program to check if given string is 04
palindrome or not.
(c) Explain arithmetic operator and assignment operator in 07
python.
Q.4 (a) Write a Python function to sum all the numbers in a list. 03
(b) Explain nested if else statement in python 04
(c) Explain the different methods available for manipulating 07
the CSV files in python.
OR
Q.4 (a) Explain the structure of while loop in python. 03
(b) What is meant by module in python. List some of the built 04
in module and built in functions of python.
1
(c) Write a function in python to count the number of lines 07
from a text file "sample.txt" which is not starting with an
alphabet "T". If the file "sample.txt" contains the
following lines: What will be the output?

A boy is playing there.


There is a playground.
An aeroplane is in the sky.
The sky is pink.
Alphabets and numbers are allowed in the password.
Q.5 (a) What are keywords in python? 03
(b) What is micro python? Where is it use? 04
(c) Describe the different access mode of file in python. 07
OR
Q.5 (a) What are the rules for naming a variable in python? 03
(b) Explain the difference between python and micro python. 04
(c) Describe the need for catching exceptions using try and 07
except statements with suitable example.

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2022
Subject Code:3151108 Date:04-01-2023
Subject Name:Python Programming
Time:10:30 AM TO 01:00 PM Total Marks:70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
Marks
Q.1 (a) Explain dictionary in python with suitable example. 03
(b) Explain the use of pass, break and continue statement in python. 04
(c) Discuss the advantage and disadvantage of python. 07

Q.2 (a) Explain the structure of for loop in python with suitable example. 03
(b) Write a short note on: Bitwise operators in python. 04
(c) Write a python program to print all the prime numbers between 100 07
to 200.
OR
(c) Write a Python program to generate pyramid pattern as given 07
below.

*
* *
* * *
* * * *

Q.3 (a) What are the advantage of choosing mnemonics variable name in 03
python?
(b) What is different type of error in python? Explain in brief. 04
(c) Explain various type conversion function in python 07
OR
Q.3 (a) Explain modulo operator in python with the help of suitable 03
example.
(b) Explain the use of following built in function in python. max(), 04
pow(), str(), input()
(c) Explain different mode for opening a file in python. 07

Q.4 (a) Give comparison between Tuple and List in python. 03


(b) Write a python program to multiply all the numbers stored in a list. 04
(c) With the help of suitable example explain how can we read and 07
write to a CSV file in python?

1
OR
Q.4 (a) What is the output of following code snippet? 03
def fred():
print("Zap")

def jane():
print("ABC")

jane()
fred()
jane()
(b) What is the purpose of “def” keyword in python? 04
(c) Explain the conversion of list to dictionary in python. 07

Q.5 (a) Explain various arithmetic and logical operator in python 03


(b) Explain catching exception using try and except in python. 04
(c) What is set in python? Explain various methods that can be used 07
with sets in python.
OR
Q.5 (a) Explain the difference between python and micro python. 03
(b) Write a short note on: Sensor programming using micro python. 04
(c) Write a python program to turn on and off LED when the button is 07
pressed. Button and LED are connected to GPIO pin.

************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V(NEW) EXAMINATION – SUMMER 2022
Subject Code:3151108 Date:02/06/2022
Subject Name:Python Programming
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

MARKS
Q.1 (a) Explain how string is converted into list? Convert String S = “GTU 03
Supports Innovation” into list.
(b) How list is different from tuple? Write advantages of tuple. 04
(c) Describe Arithmetic Operators, Assignment Operators and Bitwise 07
Operators in detail with examples

Q.2 (a) Explain for loop in python. Display even numbers from 0 to 100 using 03
for loop
(b) Explain while loop in python. How to create infinite while loop? How 04
to break infinite while loop in certain condition? Explain with example.
(c) Explain nested if statements in Python with logical combinations. 07
Write program to get temperature and humidity from the user. Display
following messages in different situations:
(1) If temperature>30 and humidity<20% Message: “Hot and Dry”
(2) If temperature is in between 20 to 30 and Humidity between 20%
to 40% Message: “Good weather condition”
(3) If temperature is between 20 to 30 and Humidity more than 80%
Message: “Moisture present”
OR
(c) Write Python program that accepts a sentence and calculate the number 07
of words, digits, uppercase letters and lowercase letters

Q.3 (a) Explain the is and is not operators with example 03


(b) Write a Python Program to find the sum of all Odd numbers up to 04
a number specified by the user.
(c) Write Python Program to get number from the user and find the Sum 07
of digits in entered number by the user and print the sum. Prompt the
user to get the input number.
OR
Q.3 (a) Write Python Program to find factorial of given number 03
(b) Explain continue and pass statements in Python with example. What 04
is the use of continue and pass statements?
(c) Explain command line arguments with help of one example 07

Q.4 (a) Write Python code to check if a given year is a leap year or not ? 03

1
(b) Write a Python Program to input information for 5 number of students 04
as given below:
a. Name
b. Registration Number
c. Total Marks
(c) Write Python Program to Prompt for a Marks in the range 07
of 0 to 100. If the entered mark is out of range, it should print an error.
If the entered marks is between 0 and 100, print a grade using following
information:
Marks ≥ 70 Grade A
60≤Marks<70 Grade B
50 ≤ Marks <60 Grade C
40 ≤ Marks <50 Grade D
Marks<40 Grade FF
OR
Q.4 (a) Explain file exception handling. What are the reasons for file 03
exceptions?
(b) Write Python Program to count the number of times an item appears in 04
the list.
(c) Given a point(x,y), Write Python Program to find whether this point 07
lies in the First, Second, Third or Fourth Quadrant of X - Y Plane. Print
message of corresponding quadrant.

Q.5 (a) List Integrated development environment (IDE) used for Micropython 03
programming
(b) Write Micropython program to send digital data 0 to pin no. 4 and 04
digital data 1 to pin no. 2 of NodeMCU board.
(c) Write a Python program to check the validity of a password entered by 07
the user. Provide prompt to the use to enter the password.
The Password should satisfy the following criteria:
1. Contain at least 1 letter between a and z
2. Contain at least 1 number between 0 and 9
3. Contain at least 1 letter between A and Z
4. Minimum length of password: 6
If password satisfies all above condition, print message “Valid
password” else print message “Invalid password”.
OR
Q.5 (a) Explain difference between Python and Micropython. 03
(b) What is the necessity of file operations? Explain different mode of file 04
opening. Which mode is preferred if
(c) Write Micropython program to read sensor data from pin A0 of 07
NodeMCU board. Glow LED connected at pin number 4 of NodeMCU
if sensor data is greater than 500.
*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – WINTER 2021
Subject Code:3151108 Date:15/12/2021
Subject Name:Python Programming
Time:02:30 PM TO 05:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.

Marks
Q.1 (a) Define Python? List the important features of python. 03
(b) What is tuple ? What is the difference between list and tuple? 04
(c) Write short note on different types of operators in python with appropriate 07
example.

Q.2 (a) What is a function? Mention the type of function and use. 03
(b) What is len function and explain how it is used on strings with an example. 04
(c) What is Data Type? Explain various data types used in Python. 07
OR
(c) Write a python program to check if a string is palindrome or not. 07
Q.3 (a) What is the use of str.upper() and str.lower() functions in string? 03
(b) What are Python's dictionaries? Explain how to create a dictionary in python? 04
(c) Explain following List methods in python with appropriate example. 07
a) append() b) insert() c) remove() d) clear() e) reverse()
OR
Q.3 (a) What is meant by module in python? . List some built in modules in python. 03
(b) Explain break and continue statement in python? 04
(c) What is an exception? Explain about the different types of Exceptions in 07
Python.
Q.4 (a) Explain string comparison with an example. 03
(b) Which method is used to read the contents of a file which is already created? 04
(c) Write a program to enter a number in Python and print its octal and hexadecimal 07
equivalent
OR
Q.4 (a) What are negative indexes and why are they used? 03
(b) What is the difference between = = and is operator in Python? 04
(c) Write a python program to find the factorial of any number. 07
Q.5 (a) Write the syntax and usage of WHILE and FOR loop. 03
(b) Give difference between Micro Python and Python. 04
(c) Explain all file processing modes supported in Python. 07
OR
Q.5 (a) What is micro python? Discuss unique features of micro python. 03
(b) How does del operation work on dictionaries? Give an example. 04
(c) Write program in MicroPython to send digital data on GPIO pins of NodeMCU 07
and glow LED connected with NodeMCU or any other MicroPython supported
board.

1
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE - SEMESTER–V (NEW) EXAMINATION – SUMMER 2021
Subject Code:3151108 Date:07/09/2021
Subject Name:Python Programming
Time:10:30 AM TO 01:00 PM Total Marks: 70
Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Simple and non-programmable scientific calculators are allowed.
MARKS
Q.1 (a) Describe merits and demerits of python over other language. 03
(b) Write Python code to find and print first n- Fibonacci numbers. 04
(c) Describe mathematical and logical operators in python. 07

Q.2 (a) What is difference between list and tuple. 03


(b) Describe elsif ladder structure and nested if..else.. statement. 04
(c) Write Python code to print following pattern using nested loop. 07
*
**
***
****
** ***
OR
(c) Write Python code to find average, Maximum and Minimum of 07
marks obtained by students for Engineering Drawing subject
(class size : 60)

Q.3 (a) Describe dictionary example in python. How to access individual 03


members?
(b) Describe user defined function in python. 04
(c) Write a python program to read data from “file1.csv”, if data is 07
negative write it in “negative.csv” and if data is positive write it
in “positive.csv”
OR
Q.3 (a) Describe concept of “set” in python. How to access individual 03
members of set?
(b) Describe file handling functions in python. 04
(c) Write a program to print the same python program using file 07
handling.

Q.4 (a) Describe with example : Module in python 03


(b) Describe break, continue, pass statement with example 04
(c) Write a python function to convert string into upper case and find 07
length of string. String will be passed to function from main
program print both the return value in main program..
OR
Q.4 (a) Describe range function with example. 03
(b) Describe exception handling with example. 04
(c) Write a program to plot 07
(1) sin wave

1
(2) cosine wave
(3) y = x2 + 2x + 1
range of -5 to 5 on (A) separate plot (B) same plot.
Put axes label and plot title for both plots.

Q.5 (a) Describe features of python which are not supported by 03


MicroPython.
(b) Differentiate: Python and MicroPython. 04
(c) Write MicroPython program to blink LED at 1 sec on GPIO pin 07
OR
Q.5 (a) Enlist various IDE available to program MicroPython program. 03
(b) Describe features of MicroPython 04
(c) Write MicroPython program to read proximity sensor connected 07
at Pin1, blink the LED if sensing is detected.

*************

2
Seat No.: ________ Enrolment No.___________

GUJARAT TECHNOLOGICAL UNIVERSITY


BE- SEMESTER–V (NEW) EXAMINATION – WINTER 2020
Subject Code:3151108 Date:22/01/2021
Subject Name:Python Programming
Time:10:30 AM TO 12:30 PM Total Marks: 56
Instructions:
1. Attempt any FOUR questions out of EIGHT questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
Marks
Q.1 (a) Briefly explain Data types and Variable in Python. 03
(b) Write a program that calculates and prints the number of minutes in a year. 04
(c) Discuss following Python’s operators: Arithmetic, Assignment, Comparison, 07
Logical with suitable examples.

Q.2 (a) What is The Structure and Behavior of a “while Loop” explain with example. 03
(b) Write a program that accepts the lengths of three sides of a triangle as inputs. The 04
program output should indicate whether or not the triangle is a right triangle.
(c) Write a python script to Convert Decimal number to Binary number 07
Q.3 (a) Discuss Boolean Functions with examples. 03
(b) Define a function named even. This function expects a number as an argument and 04
returns True if the number is divisible by 2, or it returns False otherwise.
(c) Write a Python function to calculate the factorial of a number (a non- 07
negative integer). The function accepts the number as an argument

Q.4 (a) Discuss in brief python “Dictionaries” with example 03


(b) Assume that the variable data refers to the dictionary {'b':20, 'a':35}. Write the 04
values of the following expressions:
a. data['a'] b. data.get('c', None) c. len(data) d. data.keys()
(c) Write a Python function that checks whether a passed string is palindrome or 07
not
Q.5 (a) Discuss common functions for accessing files 03
(b) what are the differences between python and Micro python 04
(c) Write a Python program to copy the contents of a file to another file 07

Q.6 (a) How to read CSV file in python explain with example. 03
(b) Discus the steps of Installation of MicroPython on Hardware 04
(c) Write a python program to find the longest words in a read file. 07

Q.7 (a) Explain following fucntions of micropython: 03


1. uart.read(5); 2. pwm0.freq(1000) 3. wlan.scan()
(b) Write a micropython script to Blink led pin connected to GPIO digital pin 1 04
to 4 of ESP8266 continuously.
(c) Write a micropython script to read PIR sensor data for an ESP8266. If value 07
is high print “Motion detected” otherwise print “Motion Stopped”.

Q.8 (a) Explain steps in micropython to connect esp module’s wifi. 03


(b) Write a micro python program: if Button is Connected with Pin number 1 of 04
ESP8266. When button is pressed toggle the leds connected to pin number 2
and 3.
(c) Write a micropython script to read and print DHT Sensor data for ESP8266 07
continuously.
*********

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy