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

Python Computing Week 1 & 2 Answers

The document contains answers to questions from two weeks of a computing course using Python. It includes true/false and multiple choice answers for Week 1 and Week 2, along with programming solutions for specific problems. The programming answers involve calculating sums, checking for neon numbers, and counting vowels in a message.

Uploaded by

friendlyego167
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Python Computing Week 1 & 2 Answers

The document contains answers to questions from two weeks of a computing course using Python. It includes true/false and multiple choice answers for Week 1 and Week 2, along with programming solutions for specific problems. The programming answers involve calculating sums, checking for neon numbers, and counting vowels in a message.

Uploaded by

friendlyego167
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Joy of Computing using Python

WEEK-1 ANSWERS WEEK-2 ANSWERS


[Link] 1.B
2.A 2.B
3.10000 3.A,D
4.B 4.A
5.C 5.B
[Link] 6.B
7.B 7.C
8.C 8.B
9.D 9.D
10.B 10.A
11.D 11.B
12.B 12.B
13.B 13.A
14.C 14.B
15.B 15.B
16.B 16.A
17.B 17.C
18.B 18.B
19.C 19.C
20.C 20.A
21.B 21.C
22.C 22.B
23.C 23.B
24.A 24.B
25.B 25.B
26.D 26.A
27.B 27.B,C
28.C 28.B
29.B 29.A
30.C 30.B
WEEK-2 PROGRAMMING ANSWERS
1) ANSWER
n = int(input())
count_of_odds = (n + 1) // 2
sum_of_odds = count_of_odds ** 2
print(sum_of_odds)
2) ANSWER
pin = int(input(""))
square = pin * pin
digit_sum=sum(int(digit) for digit in
str(square))
if digit_sum == pin:
print("Neon Number")
else:
print("Not Neon Number")
3) ANSWER
message = input()
vowels = "aeiouAEIOU"
vowel_count = sum(1 for char in message
if char in vowels)
print(vowel_count)

You might also like