1+ <!DOCTYPE html> < html lang ="en ">
2+ < head >
3+ < meta charset ="UTF-8 " />
4+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 "/>
5+ < title > Python Basic - Week 2 Test</ title >
6+ < style >
7+ body {
8+ font-family : 'Segoe UI' , sans-serif;
9+ background : linear-gradient (135deg , # ff9a9e, # fad0c4 );
10+ padding : 20px ;
11+ color : # 333 ;
12+ }
13+ .container {
14+ max-width : 900px ;
15+ margin : auto;
16+ background : # fff ;
17+ padding : 30px ;
18+ border-radius : 15px ;
19+ box-shadow : 0 10px 20px rgba (0 , 0 , 0 , 0.1 );
20+ }
21+ h2 {
22+ text-align : center;
23+ color : # e84393 ;
24+ }
25+ .question {
26+ margin-bottom : 20px ;
27+ }
28+ textarea , input [type = "text" ], input [type = "email" ] {
29+ width : 100% ;
30+ padding : 10px ;
31+ margin-top : 5px ;
32+ border-radius : 10px ;
33+ border : 1px solid # ccc ;
34+ }
35+ button {
36+ background-color : # e84393 ;
37+ color : white;
38+ padding : 12px 20px ;
39+ border : none;
40+ border-radius : 10px ;
41+ cursor : pointer;
42+ display : block;
43+ margin : 20px auto;
44+ font-size : 16px ;
45+ }
46+ button : hover {
47+ background-color : # d63031 ;
48+ }
49+ </ style >
50+ </ head >
51+ < body >
52+ < div class ="container ">
53+ < h2 > Python Basic - Week 2 Test</ h2 >
54+ < form name ="week2test " method ="POST " data-netlify ="true ">
55+ < input type ="hidden " name ="form-name " value ="week2test ">
56+ < label > Your Full Name:</ label >
57+ < input type ="text " name ="name " required >
58+ < label > Your Email:</ label >
59+ < input type ="email " name ="email " required > < div class ="question ">
60+ < p > 1. What is the correct syntax to define a function in Python?</ p >
61+ < input type ="radio " name ="q1 " value ="a " required > a) function myfunc():< br >
62+ < input type ="radio " name ="q1 " value ="b "> b) def myfunc():< br >
63+ < input type ="radio " name ="q1 " value ="c "> c) define myfunc():< br >
64+ < input type ="radio " name ="q1 " value ="d "> d) func myfunc():< br >
65+ </ div >
66+
67+ < div class ="question ">
68+ < p > 2. How do you insert COMMENTS in Python code?</ p >
69+ < input type ="radio " name ="q2 " value ="a " required > a) // This is a comment< br >
70+ < input type ="radio " name ="q2 " value ="b "> b) <!-- This is a comment --> < br >
71+ < input type ="radio " name ="q2 " value ="c "> c) # This is a comment< br >
72+ < input type ="radio " name ="q2 " value ="d "> d) /* This is a comment */< br >
73+ </ div >
74+
75+ < div class ="question ">
76+ < p > 3. What is the output of: print(type(10))?</ p >
77+ < input type ="radio " name ="q3 " value ="a " required > a) <class 'float'>< br >
78+ < input type ="radio " name ="q3 " value ="b "> b) <class 'int'>< br >
79+ < input type ="radio " name ="q3 " value ="c "> c) integer< br >
80+ < input type ="radio " name ="q3 " value ="d "> d) 10< br >
81+ </ div >
82+
83+ <!-- Add more updated and colorful questions here (4 to 15) -->
84+
85+ < div class ="question ">
86+ < p > Program 1: Write a Python program to find the largest of three numbers.</ p >
87+ < textarea name ="prog1 " placeholder ="Write your Python code here... " required > </ textarea >
88+ </ div >
89+
90+ < div class ="question ">
91+ < p > Program 2: Write a Python program to check if a number is prime.</ p >
92+ < textarea name ="prog2 " placeholder ="Write your Python code here... " required > </ textarea >
93+ </ div >
94+
95+ < button type ="submit "> Submit Test</ button >
96+ </ form >
97+
98+ </ div >
99+ </ body >
100+ </ html >
0 commit comments