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

Pyhton Assignment 1: Submitted By: Navneet Singh Roll No: 1902159 Class: X2

The document describes an experiment to install Python and solve code challenges. It provides step-by-step instructions to download and install Python on Windows. It then presents two code challenges - the first asks the student to write arithmetic expressions for various descriptions, and the second challenge asks the student to add code to print "Hello World!" and observe the output of a program that performs string concatenation of numeric input.

Uploaded by

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

Pyhton Assignment 1: Submitted By: Navneet Singh Roll No: 1902159 Class: X2

The document describes an experiment to install Python and solve code challenges. It provides step-by-step instructions to download and install Python on Windows. It then presents two code challenges - the first asks the student to write arithmetic expressions for various descriptions, and the second challenge asks the student to add code to print "Hello World!" and observe the output of a program that performs string concatenation of numeric input.

Uploaded by

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

Submitted By: Navneet Singh

Roll No : 1902159
Class : X2

Pyhton Assignment 1
Experiment-1
Aim: Explain the steps of Installation of Python and Solve the following Code Challenges.

Step 1: Click Python Download.

Step 2: click the Windows link (two lines below the Download Python 3.8 button)

The following page will appear in your browser.

Installing 1. Double-click the icon labeling the file python-3.8-amd 34.exe. A Python 3.8(3 4-bit)
Setup pop-up window will appear.

2. install launcher for all users (recommended) and the Add Python 3.8 to PATH checkboxes at the
bottom are checked.

3.Highlight the Install Now (or Upgrade Now) message, and then click it. When run, a User Account
Control pop-up window may appear on your screen. I could not capture its image, but it asks, Do you
want to allow this app to make changes to your device.

4.Click the Yes button. A new Python 3.8 (34-bit) Setup pop-up window will appear with a Setup
Progress message and a progress bar.

5.Click the Close button.

CODE CHALLENGE 1
1. Write suitable arithmetic expressions for the displayed descriptions

Ques 1 : Sum 1056 and 637

Ans: 1056+637

Ques 2 : Difference between 5627 and 2638

Ans: 5627 – 2638

Ques 3 : 36 mod 5

Ans: 36% 5

Ques 4: Sum of 8 and 9 multiplied by 4

Ans: ( 8 + 9) *4

Ques 5 :54 to the 9th power


Ans 54**9

Ques 6: An expression that will result in 23 and which includes multiplication

Ans: ( 2*11) + 1

Ques 7: Sum of 177 mod 4 and 223 mod 5

Ans 177 % 4 + 223 % 5

Ques 8 :Difference between 3rd power of 14 and 3rd power of 9

Ans: 14**3 – 9**3

Ques 9. An expression that will result in 0, which does not include multiplication and contains at
least 3 arithmetic operators

Ans: ( 9 - 9 )/ (4+7)

Ques 10 : An expression that includes all six arithmetic operators, addition (+), subtraction (-),
multiplication (*), division (/), modulo (%) and power (**)

Ans: (6**2-6) / ( 6%1+3*1)

CODE CHALLENGE 2

1. In the given code, add the text that will display the text, Hello World!
Ans: print(“ Hello World! ”)

1. 2. Conduct this experiment. Run the following program to see what happens. Note your
observations so that you can revisit them when you learn about data types.

Ans :

a = input("Enter any number: ")


b = input("Enter any number: ")
print(a+b)

You might also like