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

Assignment 1

Uploaded by

ae05ejaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views

Assignment 1

Uploaded by

ae05ejaz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Reg.

# _______________Section ________ Name _________________________


Department: Computer Engineering Program: B.E Tech. (Computer)

Assignment 1
CET-102T Programming Fundamentals

Announced date: 28-10-2024 Due Date: 04-11-2024 Total Marks = 2


Marks Obtained =
Teacher Name: Dr. Shaheena Noor

Sr. No Course Learning Outcomes PLOs Blooms


Taxonomy
CLO_1 Understand fundamental concepts of SA1
C2
computer programming to solve a problem. (Engineering Technology
(Understanding)
Knowledge)
Instructions
1. The solution must be done on A4 size page.
2. The solution must be hand written. Typed assignment will not be considered
3. All steps must be properly shown. Direct answers will deduct your marks.

Question#01: Predict Python coding expressions of the following statements. (Assuming the
given variables is already having meaningful values):
i. Assign the values 100, 200, and 300 to the variables a, b, and c in a single statement.
ii. Assign the string "John" to the variable first_name and the string "Doe" to the
variable last_name in a single statement.
iii. Assign the concatenation of first_name and last_name to the variable full_name,
including a space between the two names.
iv. Check if the variable b is greater than a and less than c. Write the condition using a
single line.
v. Assign the values of 5 to x and 10 to y, and then compute the sum of x and y,
assigning the result to the variable total.
vi. Check if the variable num is neither less than 10 nor greater than 20. Write the
condition using a logical expression.

Question#02: Given a number as user input, distinguish if it is even or odd by answering the
following questions:
i. Write an algorithm to check if a user-inputted number is even or odd.
ii. Provide the pseudocode for this task.
iii. Draw a flowchart that illustrates the process of checking if a user-inputted number is
even or odd.
Note: Ensure the solution includes clear decision-making steps and prompts the user to input a
number.

You might also like