0% found this document useful (0 votes)
168 views2 pages

Python Assignment 1: Coding Tasks

The document provides instructions for 13 Python programming assignments: 1. Write a program to find the type of the input function. 2. Write a program to find the type of the print function and take two number inputs to print their sum. 3. Take a name and age as input and output them in the format "Name -> Age" or "My name is Name. And my age is Age". 4. Print multiple strings separated by a given separator. 5. Guess the output of print statements with multiple arguments. 6. Check which variables or statements are valid or invalid in Python.

Uploaded by

Neha Bansal Jain
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)
168 views2 pages

Python Assignment 1: Coding Tasks

The document provides instructions for 13 Python programming assignments: 1. Write a program to find the type of the input function. 2. Write a program to find the type of the print function and take two number inputs to print their sum. 3. Take a name and age as input and output them in the format "Name -> Age" or "My name is Name. And my age is Age". 4. Print multiple strings separated by a given separator. 5. Guess the output of print statements with multiple arguments. 6. Check which variables or statements are valid or invalid in Python.

Uploaded by

Neha Bansal Jain
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

Python Assignment 1 | Coding Blocks Junior

1. Write a program to find type of input function.


2. What is the type of print function? Also write a program to find it’s type.
3. Write a program to take two inputs for values of a and b, then print the sum of these two
values.
4. Write a program that takes the input of name and age and prints out like: “name -> age”. Ex:
name = “Rahul”, age = xyz. The output is “Rahul -> xyz”.
5. In above question write a program to give output as : “My name is name. And my age is age”.
Take name and age as input from user. Ex: for name = “Manmohan” and age = xyx. Output =
“My name is Manmohan. And my age is xyz”
6. What will be the output for following program. Print(“Manmohan”, “Gupta”, “Rahul”, “Janghu”,
sep=” and ”).
a. What will be the outut for following code: print("Hello", "VMCians").
7. Guess the output for this code: print("Hello", "VMCians"), print("Are you excited?")
8. Guess the output for this code: print("Hello", "VMCians" , end="How are you? "), print("Are you
excited?")
9. Which of the following can’t be a variable in python: _name, 22, He22llo, Rahul
10. Take input from user for values of a and b. Divide the value of a by b and print the output in
integer form. Ex: a = 6, b = 3. Divide = 2.
11. Can we directly add two numbers taken as inputs from user without changing their datatype.
Why?
12. Can we print any datatype using print function?
13. a = 2, b = “2”. Sum = a + b. Guess the output also find the reason for the same?
14. Which of the following is an invalid statement: -> a, b = 4, 5 -> a_b = 1,00 -> a b = 4, 5

For any doubts and questions to our mentor, jo​in our ​Discord​ Ser​ver​ or ​Telegra​m
Group​!
Don't forget to submit your assignment a​t ​[Link] to be
eligible for course certificates.

You might also like