# Python Assignment 1

**URL:** <https://forum.guvi.in/t/python-assignment-1/658>\
**Category:** Zen\
**Tags:** python, data-science\
**Created:** [June 10, 2026, 4:29am UTC](https://forum.guvi.in/t/python-assignment-1/658 "2026-06-10T04:29:39Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 10, 2026, 4:29am UTC](https://forum.guvi.in/t/python-assignment-1/658/1 "2026-06-10T04:29:39Z")

</div>

Dear all, I hope you all have received the first assignemnt. I would request everyone to complete the assignemnt and submit it by Saturday. Use this thread to ask any questions if you have.

@chalapakaramakrishna41422 @anuj9620029081659 @pavithrasuji3157526 @shwetahemaswati17967 @karthikjohnson1790532 @jhachandani8169654 @anithathampy36963840 @vjkit4219280

---

<div class="post-metadata">

**Author:** ![jhachandani8169654](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jhachandani8169654](https://forum.guvi.in/u/jhachandani8169654)\
**Post date:** [June 10, 2026, 7:34am UTC](https://forum.guvi.in/t/python-assignment-1/658/2 "2026-06-10T07:34:26Z")

</div>

i have a problem in question no.22

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 10, 2026, 1:49pm UTC](https://forum.guvi.in/t/python-assignment-1/658/3 "2026-06-10T13:49:11Z")

</div>

Sure, let me know the issue

---

<div class="post-metadata">

**Author:** ![jhachandani8169654](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jhachandani8169654](https://forum.guvi.in/u/jhachandani8169654)\
**Post date:** [June 10, 2026, 2:04pm UTC](https://forum.guvi.in/t/python-assignment-1/658/4 "2026-06-10T14:04:30Z")

</div>

how make compare which is greater i .had written this code

number =int(input(“enter the number”))  
if a \> b:  
print (“a is greater”)  
else:  
print (“b is greater”)

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 10, 2026, 2:54pm UTC](https://forum.guvi.in/t/python-assignment-1/658/5 "2026-06-10T14:54:54Z")

</div>

This looks correct, only you need to take care of the indentation. Otherwise the code is correct

---

<div class="post-metadata">

**Author:** ![jhachandani8169654](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jhachandani8169654](https://forum.guvi.in/u/jhachandani8169654)\
**Post date:** [June 10, 2026, 3:09pm UTC](https://forum.guvi.in/t/python-assignment-1/658/6 "2026-06-10T15:09:48Z")

</div>

the error which i get is  
number =int(input(“enter the number”))  
if a \> b:  
print (“a is greater”)  
else:  
print (“b is greater”)

```auto
ValueError Traceback (most recent call last)

```

```auto
[/tmp/ipykernel_1074/1334999706.py](https://localhost:8080/#) in <cell line: 0>()
----> 1 number =int(input("enter the number"))
      2 if a > b:
      3 print ("a is greater")
      4 else:
      5 print ("b is greater")

```

```auto
ValueError: invalid literal for int() with base 10: 'b'

```

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 10, 2026, 3:26pm UTC](https://forum.guvi.in/t/python-assignment-1/658/7 "2026-06-10T15:26:41Z")

</div>

What’s the input that you have entered? Also, you have taken the input in a variable named ‘number’, however you are comparing two different variables. What’s inside a and b? Did you take any inputs there?

---

<div class="post-metadata">

**Author:** ![jhachandani8169654](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jhachandani8169654](https://forum.guvi.in/u/jhachandani8169654)\
**Post date:** [June 10, 2026, 4:32pm UTC](https://forum.guvi.in/t/python-assignment-1/658/8 "2026-06-10T16:32:16Z")

</div>

ok got it ,i change the variable to the specific number then it run without error .

---

<div class="post-metadata">

**Author:** ![chalapakaramakrishna41422](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@chalapakaramakrishna41422](https://forum.guvi.in/u/chalapakaramakrishna41422)\
**Post date:** [June 11, 2026, 6:30am UTC](https://forum.guvi.in/t/python-assignment-1/658/9 "2026-06-11T06:30:09Z")

</div>

i have few questions:  
1.How many functions are available in Dictionary / what functions can we use in Dictionay?  
i found one, update()

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 11, 2026, 6:47am UTC](https://forum.guvi.in/t/python-assignment-1/658/10 "2026-06-11T06:47:05Z")

</div>

Nice question. There are a lot of functions a dictionary supports. Rather than listing all of them, throughout the course we will be discussing the practicle examples. However, you can go through the official documentation: [5. Data Structures — Python 3.14.6 documentation](https://docs.python.org/3/tutorial/datastructures.html#dictionaries)

---

<div class="post-metadata">

**Author:** ![vjkit4219280](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vjkit4219280](https://forum.guvi.in/u/vjkit4219280)\
**Post date:** [June 11, 2026, 10:58am UTC](https://forum.guvi.in/t/python-assignment-1/658/11 "2026-06-11T10:58:28Z")

</div>

Hi Amit,

Please find my assignment 1 pdf attached.

Regards,  
Vijay Krishna  
8008001956

(Attachment J\_Vijay\_Krishna\_Assignment 1 Submission.pdf is missing)

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 11, 2026, 11:18am UTC](https://forum.guvi.in/t/python-assignment-1/658/12 "2026-06-11T11:18:45Z")

</div>

Please submit it through form that has been shared with you

---

<div class="post-metadata">

**Author:** ![vjkit4219280](https://avatars.discourse-cdn.com/v4/letter/v/6f9a4e/32.png) [@vjkit4219280](https://forum.guvi.in/u/vjkit4219280)\
**Post date:** [June 11, 2026, 11:38am UTC](https://forum.guvi.in/t/python-assignment-1/658/13 "2026-06-11T11:38:15Z")

</div>

Hi Amit,

The form is asking to provide the google drive link where the assignment is submitted or uploaded. However i do not have permissions to upload in the mentioned google drive link.

Please suggest.

Regards,  
Vijay

---

<div class="post-metadata">

**Author:** ![jhachandani8169654](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@jhachandani8169654](https://forum.guvi.in/u/jhachandani8169654)\
**Post date:** [June 11, 2026, 1:50pm UTC](https://forum.guvi.in/t/python-assignment-1/658/14 "2026-06-11T13:50:17Z")

</div>

question no.27  
how to do

3rd and 4th part of the question

---

<div class="post-metadata">

**Author:** ![amitkumar30949](https://yyz1.discourse-cdn.com/flex033/user_avatar/forum.guvi.in/amitkumar30949/32/280_2.png) [@amitkumar30949](https://forum.guvi.in/u/amitkumar30949)\
**Post date:** [June 12, 2026, 6:58am UTC](https://forum.guvi.in/t/python-assignment-1/658/15 "2026-06-12T06:58:55Z")

</div>

That’s the assignment 🙂

Let’s say if you have taken input for “Salary”. Suppose the input is Rs 1000, then 10% of Rs 1000 would be Rs 100, so updated salary would be 1100. That’s what you need to do via programming
