-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassignment 4.py
36 lines (36 loc) · 1.12 KB
/
assignment 4.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
========== RESTART: D:/1st Semester 2022/Coding/assignment 4 ques 1.py =========
Enter marks: 70
Grade: B
>>>
========== RESTART: D:/1st Semester 2022/Coding/assignment 4 ques 2.py =========
Enter a year: 2006
Not a leap year
>>>
========== RESTART: D:/1st Semester 2022/Coding/assignment 4 ques 3.py =========
Question 1: 5 x 9 = 45
Right!
Question 2: 1 x 8 = 8
Right!
Question 3: 9 x 5 = 35
Wrong. The answer is 45.
Question 4: 5 x 6 = 30
Right!
Question 5: 1 x 9 = 9
Right!
Question 6: 8 x 6 = 48
Right!
Question 7: 7 x 1 = 7
Right!
Question 8: 6 x 2 = 12
Right!
Question 9: 5 x 8 =
Traceback (most recent call last):
File "D:/1st Semester 2022/Coding/assignment 4 ques 3.py", line 10, in <module>
answer = int(input(f"Question {i + 1}: {a} x {b} = "))
ValueError: invalid literal for int() with base 10: ''
>>>
========== RESTART: D:/1st Semester 2022/Coding/assignment 4 ques 4.py =========
The number of pieces in the bowl is: 177